Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/63.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails rake任务在rails 3中没有发现_Ruby On Rails_Rubygems_Ruby On Rails 3_Rake_Bundler - Fatal编程技术网

Ruby on rails rake任务在rails 3中没有发现

Ruby on rails rake任务在rails 3中没有发现,ruby-on-rails,rubygems,ruby-on-rails-3,rake,bundler,Ruby On Rails,Rubygems,Ruby On Rails 3,Rake,Bundler,我在开始使用rails 3.0.0时遇到了麻烦,因为它没有加载rake任务 rake gems:安装 rake aborted! Don't know how to build task 'gems:install' rake-T rake about # List versions of all Rails frameworks and the environment rake db:create # Create the database fro

我在开始使用rails 3.0.0时遇到了麻烦,因为它没有加载rake任务

rake gems:安装

rake aborted!
Don't know how to build task 'gems:install'
rake-T

rake about              # List versions of all Rails frameworks and the environment
rake db:create          # Create the database from config/database.yml for the current Rails.env (use db:create:all to create all dbs in the config)
rake db:drop            # Drops the database for the current Rails.env (use db:drop:all to drop all databases)
rake db:fixtures:load   # Load fixtures into the current environment's database.
rake db:migrate         # Migrate the database (options: VERSION=x, VERBOSE=false).
rake db:migrate:status  # Display status of migrations
rake db:rollback        # Rolls the schema back to the previous version (specify steps w/ STEP=n).
rake db:schema:dump     # Create a db/schema.rb file that can be portably used against any DB supported by AR
rake db:schema:load     # Load a schema.rb file into the database
rake db:seed            # Load the seed data from db/seeds.rb
rake db:setup           # Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the db first)
rake db:structure:dump  # Dump the database structure to an SQL file
rake db:version         # Retrieves the current schema version number
rake doc:app            # Generate docs for the app -- also availble doc:rails, doc:guides, doc:plugins (options: TEMPLATE=/rdoc-template.rb, TITLE="Custom Title")
rake log:clear          # Truncates all *.log files in log/ to zero bytes
rake middleware         # Prints out your Rack middleware stack
rake notes              # Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)
rake notes:custom       # Enumerate a custom annotation, specify with ANNOTATION=CUSTOM
rake rails:template     # Applies the template supplied by LOCATION=/path/to/template
rake rails:update       # Update both configs and public/javascripts from Rails (or use just update:javascripts or update:configs)
rake routes             # Print out all defined routes in match order, with names.
rake secret             # Generate a crytographically secure secret key (this is typically used to generate a secret for cookie sessions).
rake stats              # Report code statistics (KLOCs, etc) from the application
rake test               # Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins)
rake test:recent        # Run tests for recenttest:prepare / Test recent changes
rake test:uncommitted   # Run tests for uncommittedtest:prepare / Test changes since last checkin (only Subversion and Git)
rake time:zones:all     # Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6
rake tmp:clear          # Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)
rake tmp:create         # Creates tmp directories for sessions, cache, sockets, and pids
所以问题是,gems任务没有包括在内。 这可能也是原因,我不能安装指南针。它给了我以下错误:

rails新测试项目-m


捆绑机在我的系统上坏了吗?我在玩雪豹。

你必须使用bundler,而不是rake任务。 尝试: 捆绑安装

如果你想安装gems,你必须把它们放在你的Gemfile中(在项目根目录中),然后用bundler安装它们

在您的文件中:

gem "haml"
然后运行

bundle install

好的,大多数关于在rails 3中安装compass和gems的文档都已经过时了。谢谢你的帮助
bundle install