0

I'm very new with Rails and I've installed Vagrant to run the Rails server. I've started the server and am able to load localhost:3000, now I don't know where to go. The command line is blank and I read that I should type in "script/console", but all I can really do is ctrl-C or -d.

When I tried to run Vagrant in a separate Window with "vagrant up" it says I need to do "Vagrant init"

Where do I go from here so that I can start going through my tutorials/start developing?

1
  • 1
    If you're just starting out, I would just run the rails server locally. you can just open another terminal window and run rails server to be able to access your project at localhost:3000. Is there any reason you need to be using vagrant at this point?
    – jstim
    Commented Jan 15, 2013 at 19:24

2 Answers 2

2

This screencast from RailsCasts should get you started. Some of the suggestions are a bit out-dated but by reading the show notes and comments, you should be able to get up and running. From there you can modify.

While getting Rails set up initially with Vagrant will be work, it's an incredibly handy tool to have experience with. It becomes even more useful when you incorporate a provisioning tool like Puppet.

1

In your terminal if you are running the webrick server via rails server you either need to background it or open a new terminal to get your shell prompt back. If you ctrl-C out of it you will kill the server. Keep in mind, the webrick server should only be used for local development. It's not a production level web server. See the Rails Getting Started guide for more details.

If you are going to run your rails server in a Vagrant VM, you'll need to configure the port forward in your Vagrantfile so you can access from your host machine.

config.vm.forward_port 3000, 9080

There error you are seeing would be from you running vagrant up in a directory that doesn't contain a Vagrantfile.

Not the answer you're looking for? Browse other questions tagged or ask your own question.