Brant Barton
Brant Barton

Reputation: 458

Vagrant and RoR

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?

Upvotes: 0

Views: 2034

Answers (2)

clang1234
clang1234

Reputation: 1714

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.

Upvotes: 2

Kyle Campos
Kyle Campos

Reputation: 1034

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.

Upvotes: 1

Related Questions