I am a beginner.I am trying to launch rails server using the command.But I am getting an error. I tried searching in the google but no results.I will attach a picture of the log I got when I executed that command.

- 121
- 1
- 14
2 Answers
How did you setup your rails app?
It seems like maybe you didn't type bundle install This command downloads and updates all of your gems. Action View is a rails dependency.

- 15
- 5
-
I did it ! But its not working! I setup my new app and I tried to launch! Its shows the above error! – mRbOneS Jul 09 '15 at 19:38
-
After you type bundle install, what error do you get? Also, try bundle update, it will get the latest versions of your gems. – Sung Kim Jul 09 '15 at 19:40
-
I used the command:: rails new app It created everything it wanted. Then I used : rails server Then the error showed up! – mRbOneS Jul 09 '15 at 19:42
-
Yea so go back your console, type bundle install. What do you get after that? – Sung Kim Jul 09 '15 at 19:43
-
Also make sure you are in the folder of your app. You can check by typing pwd (print working directory) it should have /apps and at the end. Also, the official RoR guide should help http://guides.rubyonrails.org/getting_started.html – Sung Kim Jul 09 '15 at 19:46
-
Hey, now i used bundle update, it updated. Now when I tried to launch the server it is showing mysql 2 (Load Error) – mRbOneS Jul 09 '15 at 19:47
-
Ok that is easy, its because your mysql server is not running. Simply type into the console mysql.server start – Sung Kim Jul 09 '15 at 19:48
-
Sorry man ! net is slow here ! It shows it is not recognised as an internal or external commmand – mRbOneS Jul 09 '15 at 19:55
-
Its not recognizing it – mRbOneS Jul 09 '15 at 19:55
-
Then you don't have Mysql installed. You need to install mysql. I would also go to here and read all of the dependencies you need guides.rubyonrails.org/getting_started.html. – Sung Kim Jul 09 '15 at 19:58
-
I have mysql installed in my system! Actually I do JDBC connections using mysql itself ! – mRbOneS Jul 09 '15 at 20:00
-
1Download https://www.sqlite.org/download.html as per the Ruby guides. Later you can use other databases as you get more familiar. Idk what JDBC is, but either you don't have a compatible version of mysql and/or its not in a location rails is looking. – Sung Kim Jul 09 '15 at 20:07
-
Ok! I will try some stuff to solve this! If those doesn't work, I will use sqllite.. Thanks – mRbOneS Jul 09 '15 at 20:09
-
Best of luck! Please mark my answer (s) as the correct answer :D – Sung Kim Jul 09 '15 at 20:13
What Mysql error are you getting?
And what is in your config/database.yml?
So far, you have created the folder structure for a Rails app (rails new), then installed all the relevant components (bundle install).
When you start the server (rails server) it starts in "development" mode (you also have "test" mode for unit tests and "production" mode for when your app is live - and each has slightly different options). One of the first things the Rails server tries to do is connect to the database, so it looks in config/database.yml for the database specified in the development section.
So probably, it's trying to connect to a database that doesn't exist yet, with a username and password that are wrong.
First thing to do is to update the username and password in config/database.yml to match your local Mysql server.
Second thing to do is to build the development database; the command for that is "bin/rake db:create" (or "bundle exec rake db:create" if you're on Rails 3.x).
Hopefully that should be enough to get your server started.

- 152
- 6
-
I actually did what you said ! I updated my username and password in that yml file! But still I am getting the sql class load error – mRbOneS Jul 09 '15 at 20:32
-
-
I dual booted my system..!! Now working on ubuntu, its completely fine here! – mRbOneS Jul 14 '15 at 09:31