2

スキャフォールディングを使用してコードを作成した後、奇妙なエラーが発生しました。次のエラーは、新しい生成または破棄コマンドで表示されるようになりました。

$ rails destroy scaffold Plugin

/Library/Ruby/Gems/1.8/gems/sass-rails-3.2.5/lib/sass/rails/railtie.rb:46: uninitialized constant Sass::Plugin (NameError)
from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:34:in `call'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/application/finisher.rb:59
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `run_initializers'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in 'each'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in 'run_initializers'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/application.rb:136:in 'initialize!'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `send'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Applications/XAMPP/xamppfiles/htdocs/monaco/config/environment.rb:5
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/application.rb:103:in 'require'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/application.rb:103:in 'require_environment!'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:25
from script/rails:6:in `require'
from script/rails:6
4

1 に答える 1

0

エラーログによると、2つのオプションを試すことができます。

1) Comment one line something like gem 'sass' in Gemfile due to name conflict of Plugin 
2) Configure Sass gem properly

そうすれば、おそらく、新しい生成コマンドと破棄コマンドを適切に実行できるようになります。

于 2012-12-14T08:46:00.207 に答える