Skip to content

Rails server setup and starting issues

Sean Lerner edited this page Apr 11, 2017 · 1 revision

If your application doesn't start when you type rails server on your command line, check the message and following the appropriate guide.

Problem: Not in proper folder

If you see:

Usage:
  rails new APP_PATH [options]

Options:
  etc...

.. then try changing into your application's folder.

Problem: missing bundler

If you see:

cannot load such file -- bundler/setup (LoadError)

or

rbenv: bundle: command not found

The `bundle' command exists in these Ruby versions:
  2.3.1
  2.4.0

... then try installing bundler:

$ gem install bundler

Problem: missing gems

If you see:

Could not find <gem name> in any of the sources
Run `bundle install` to install missing gems.

... then install necessary gems:

$ bundle install

Problem: json gem error

If you see:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
...(error messages)...
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.

... then switch to a ruby 2.3.X version:

First check to see if you have a 2.3.X version installed:

rbenv versions

You'll see a list of rubies currently installed:

  system
  2.3.1
* 2.4.0
  2.4.1

If you see 2.3.1 or 2.3.3 in the list, then skip this installation step. If not, install 2.3.3:

rbenv install 2.3.3

Now switch to either 2.3.3 or 2.3.1:

rbenv local 2.3.3

Try running bundle install now:

bundle install
Clone this wiki locally