I have created a new rails project with the command:
rails project_name
but now in that project if I run:
rails server
I just creates a new project call server, it doesn't start webrick.
How do I start the server and get rails running?
Go to your browser and open http://localhost:3000, you will see a basic Rails app running. You can also use the alias "s" to start the server: bin/rails s . The server can be run on a different port using the -p option. The default development environment can be changed using -e .
One of the things rails server does is that it loads all the dependencies/gems required by your Rails app, or at least sets them up to be auto-loaded later when they are needed. This is sometimes called "booting" or loading the "Rails environment".
Rails. Puma is the default server for Rails, included in the generated Gemfile.
Old versions or rails are bugging you. Deinstall them using gem uninstall rails
. I recommend using RVM with gemsets to create separate environments for each project.
You're mixing Rails 2 and Rails 3 commands. By the looks of it, you're using Rails 2, which means starting the server would be script/server
, not rails server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With