开发者

How can I create a new rails app with rails > 3.0.3?

I am having an issue with any rails version that is after 3.0.3 when creating a new application and I would like your opinion.

First I remove rails from my system gem uninstall rails and follow the instructions properly. Then I install the latest version of rails gem install rails and everything goes fine, I get rails 3.0.7 on my system.

When I try to create a new app, here is what I get:

Usage:
  rails new APP_PATH [options]

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

Runtime options:
  -q, [--quiet]    # Supress status output
  -s, [--skip]     # Skip files that already exist
  -f, [--force]    # Overwrite files that already exist
  -p, [--pretend]  # Run but do not make any changes

Rails options:
  -v, [--version]  # Show Rails version number and quit
  -h, [--help]     # Show this help message and quit

Description:
    The 'rails new' command creates a new Rails application with a default
    directory structure and configuration at the path you specify.

Example:
    rails new ~/Cod开发者_如何学Ce/Ruby/weblog

    This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
    See the README in the newly created application to get going.

There is no way to create a skeleton, I keep getting that menu.

If I remove 3.0.7 and switch back to 3.0.3 then everything is fine, I do get an application skeleton. If I try 3.0.4, same problem.

Any idea?


Since some of you confirmed that there was absolutely nothing wrong with rails > 3.0.3 I cleaned up my configuration a bit by running:

sudo gem clean

From what I understand it removes all the older versions of gems that you have on your system thus I ended up with rails 3.0.7 and I am now successfully able to create new apps! I can go back on my project, thanks for your help :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜