tipu
tipu

Reputation: 9604

rails not recognizing project

I can create a new project using rails and I can use stuff like

rails migration ...

and i (correctly) get a error because the sqlite gem is missing.

but when i try using rails migration ... with a project i checked out from github, it doesn't recognize that it is a rails project i get:

Usage:
  rails new APP_PATH [options]

Options:
  -d, [--database=DATABASE]   # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db)
                              # Default: sqlite3
  -O, [--skip-active-record]  # Skip Active Record files
      [--dev]                 # Setup the application with Gemfile pointing to your Rails checkout
  -J, [--skip-prototype]      # Skip Prototype files
  -T, [--skip-test-unit]      # Skip Test::Unit files
  -G, [--skip-git]            # Skip Git ignores and keeps
  -b, [--builder=BUILDER]     # Path to an application builder (can be a filesystem path or URL)
      [--edge]                # Setup the application with Gemfile pointing to Rails repository
  -m, [--template=TEMPLATE]   # Path to an application template (can be a filesystem path or URL)
  -r, [--ruby=PATH]           # Path to the Ruby binary of your choice
                              # Default: /usr/bin/ruby1.8
      [--skip-gemfile]        # Don't create a Gemfile

and it goes on. any ideas?

edit: it's probably an important detail that earlier my rails wasn't working at all. i had to cp /usr/bin/ruby to /usr/bin/local/ruby

Upvotes: 2

Views: 740

Answers (1)

Brian Morearty
Brian Morearty

Reputation: 3348

I suspect the project from Github probably uses Rails 2.x and you probably have Rails 3.x.

Either that or perhaps you just forgot to "cd" into the folder after getting it from Github.

You mentioned that earlier your Rails wasn't working at all. If that's the case and if you need to switch among different versions of Rails, a really nice thing to try is rvm. It's really popular: http://rvm.beginrescueend.com/

Upvotes: 3

Related Questions