0

I have installed rails on Vagrant and trying to create my first rails application, however "rails server" is taking a long time (i.e, never seem to complete after). I am using Windows and have installed Vargant and virtual box. On my Vagrant file, I have also updated core cpu and memory to the following

vb.customize ["modifyvm", :id, "--memory", "4096"]
vb.customize ["modifyvm", :id, "--cpus", "2"]

but still can't seem to start rails on my VM Rails version is 4.2.6

below is the screen capture

Note: The command prompt is never returned after this point

Mahesh N
  • 772
  • 1
  • 10
  • 21
  • It looks like it is working. The server will continue to run until you hit `ctrl+c` to stop it. Open a 2nd terminal if needed. Can you bring up http://localhost:3000 in a browser and see the welcome page? – house9 Apr 24 '16 at 17:26

2 Answers2

0

rails server like any web server is meant to run as a persistent process. It sits there and waits for web requests - so the behavior you are seeing is actually exactly how it is supposed to work.

To exit the server (and most unix programs) you can send the terminate command with CTRL + C.

You can also run the server in the background in Bash by starting it with:

rails s &

You can then return it to the foreground with fg. Although I usually just open another shell window instead.

max
  • 96,212
  • 14
  • 104
  • 165
0

Your rails server is running properly.

But you need to whitelist that IP address.

In config/environments/development.rb include the following lines

config.web_console.whitelisted_ips = '10.0.2.2'

Read here for more information...

https://github.com/rails/web-console#configweb_consolewhitelisted_ips

SteveTurczyn
  • 36,057
  • 6
  • 41
  • 53