我在创建新的应用程序时遇到3.0.3之后的任何rails版本问题,我希望得到您的意见。如何使用rails> 3.0.3创建新的rails应用程序?
首先,我从系统中删除导轨gem uninstall rails
并正确按照说明进行操作。然后我安装最新版本的导轨gem install rails
,一切都很顺利,我的系统上安装了rails 3.0.7。
当我尝试创建一个新的应用,这里是我得到:
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 ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.
有没有方法来创建一个框架,我不断收到该菜单。
如果我删除3.0.7并切换回3.0.3,那么一切都很好,我得到一个应用程序骨架。如果我尝试3.0.4,同样的问题。
有什么想法?
你正在运行什么命令?我可以用'rails new project'创建一个新的框架' – 2011-05-17 17:40:51
刚试过一个新的rails gem(3.0.7),一切都很顺利。你发布的输出是从'rails new(appname)'?你确定你不会忘记'new'? 'rails sometestapp'给了我你粘贴的菜单,但'rails new sometestapp'给我一个3.0.7版本的新rails应用程序。 – 2011-05-17 17:42:40
@RexM @Brett我正在运行'rails new appname',我仔细检查了几次。既然它适合你,它只能是我需要理解的一个配置问题。 – RaySF 2011-05-17 17:57:17