Rails生成figaro:install不生成.yml文件

时间:2014-03-08 08:19:38

标签: ruby ruby-on-rails-4 configuration rubygems

我刚开始阅读“学习Ruby on Rails”一书。在配置文件章节中,它指出运行“rails generate figaro:install”应该生成一个config / application.yml文件。我跑了它并且一直出错。有一块宝石,我在安装时遇到了问题,这是宝石'compass-rails','〜> 2.0.alpha.0'和唯一可用的替代品是gem“compass-rails”,“〜> 1.1.3”。我不确定这是否与我不断收到此错误的事实有关。我还在底部发布了当我尝试运行此命令时得到的内容。

    /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require': cannot load such file -- sass/script/node (LoadError)
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in `<top (required)>'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in `block in <top (required)>'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `<top (required)>'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `<top (required)>'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/compass-0.12.2/lib/compass.rb:5:in `block in <top (required)>'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/compass-0.12.2/lib/compass.rb:4:in `each'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/compass-0.12.2/lib/compass.rb:4:in `<top (required)>'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/compass-rails-1.1.3/lib/compass-rails.rb:1:in `<top (required)>'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
from /home/oscar/workspace/learn-rails/config/application.rb:7:in `<top (required)>'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/railties-4.0.3/lib/rails/commands.rb:43:in `require'
from /home/oscar/.rvm/gems/ruby-2.0.0-p451@learn-rails/gems/railties-4.0.3/lib/rails/commands.rb:43:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

1 个答案:

答案 0 :(得分:1)

我遇到了与figaro相同的问题 - 它似乎与较新版本的sass gem有关,它被包含作为指南针的依赖。我通过在我的gemfile中添加以下内容来修复:this suggestion(较新版本的sass也可以使用)。

gem 'sass', '3.3.0.alpha.149'

您可能还需要从命令行运行bundle update sass。希望有所帮助!