Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails server command not working (other commands, as well)

I'm in the very first part of building a rails app and I can't get the command

rails server

to work, or really any other rails command. Whenever I attempt a rails command I get the help screen like this:

$rails server
Usage:
  rails new APP_PATH [options]

 Options:
-r, [--ruby=PATH]              # Path to the Ruby binary of your choice                                   # Default: /home/sgallagher/.rvm/rubies/ruby-1.9.2-    p290/bin/ruby
-b, [--builder=BUILDER]        # Path to a application builder (can be a filesystem path or URL)
-m, [--template=TEMPLATE]      # Path to an application template (can be a filesystem path or URL)
[--skip-gemfile]           # Don't create a Gemfile
      [--skip-bundle]            # Don't run bundle install
    -G, [--skip-git]               # Skip Git ignores and keeps

and so on (it gives me the same "rails new" command no matter what command I put in)...

Any ideas on what might be missing in my system or why these commands aren't responding? Thanks

P.S. Another peculiar thing is when I created this app, initially, I used the command:

rails new first_app

This actually created two apps: one called 'new' and another called 'first_app'. It also didn't create a default Gemfile.

I am running Rails 3.1.0 and Ruby 1.9.2. on Ubuntu 10.04.

like image 321
steve_gallagher Avatar asked Dec 02 '22 01:12

steve_gallagher


1 Answers

I was just having this problem. Make sure you are actually in the directory of your rails app whenever you execute the 'rails server' command. I wasn't in the dir. Dumb mistake but, it happens...

like image 194
Andrew Mortimer Avatar answered Dec 04 '22 10:12

Andrew Mortimer