Ruby on rails 3 如何使用rails创建新的rails应用程序>;3.0.3?
在创建新的应用程序时,我对3.0.3之后的任何rails版本都有问题,我想听听您的意见 首先,我从我的系统中删除railsRuby on rails 3 如何使用rails创建新的rails应用程序>;3.0.3?,ruby-on-rails-3,new-operator,Ruby On Rails 3,New Operator,在创建新的应用程序时,我对3.0.3之后的任何rails版本都有问题,我想听听您的意见 首先,我从我的系统中删除railsgem卸载rails,并正确地按照说明操作。然后我安装了最新版本的railsgem install rails,一切正常,我的系统上安装了rails 3.0.7 当我尝试创建一个新的应用程序时,我得到的是: Usage: rails new APP_PATH [options] Options: -J, [--skip-prototype] # Skip
gem卸载rails
,并正确地按照说明操作。然后我安装了最新版本的railsgem 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>3.0.3绝对没有问题,所以我通过运行以下命令清理了我的配置:
sudo gem clean
据我所知,它删除了系统中所有旧版本的gems,因此我最终使用了rails 3.0.7,现在我可以成功地创建新的应用程序了!我可以继续我的项目,谢谢你的帮助:)你在运行什么命令?我可以用
rails新项目创建一个新的框架
刚刚尝试了一个新的rails gem(3.0.7),一切都很顺利。您发布的输出来自railsnew(appname)
?您确定没有忘记新的
rails sometestapp
为我提供了您粘贴的菜单,但rails new sometestapp
为我提供了一个版本为3.0.7的新rails应用程序。@RexM@Brett我正在运行rails new appname
,我反复检查了几次。因为它对您有效,所以它只能是一个我需要了解的配置问题。运行rails-v
,检查rails二进制文件的版本是否符合您的预期。您运行的是什么版本的Ruby?很高兴您能够找到它。我会记住这一点,以防将来发生类似的事情。