0

在我执行 a 之后bundle update,当我尝试运行 rails s 时出现此错误:

(我唯一添加的是bcrypt-ruby宝石,但我认为这与此无关......)

/Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `less' for #<Rails::Application::Configuration:0x007fc33b079468> (NoMethodError)
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/twitter-bootstrap-rails-2.1.6/lib/twitter/bootstrap/rails/engine.rb:15:in `block in <class:Engine>'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/fettass/Documents/RailsApps/epyhrepus/config/environment.rb:5:in `<top (required)>'
    from /Users/fettass/Documents/RailsApps/epyhrepus/config.ru:4:in `require'
    from /Users/fettass/Documents/RailsApps/epyhrepus/config.ru:4:in `block in <main>'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
    from /Users/fettass/Documents/RailsApps/epyhrepus/config.ru:1:in `new'
    from /Users/fettass/Documents/RailsApps/epyhrepus/config.ru:1:in `<main>'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands/server.rb:46:in `app'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands/server.rb:70:in `start'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands.rb:55:in `block in <top (required)>'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
    from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

我该如何解决这个问题?

4

1 回答 1

0

看起来您需要将 less-rails gem 添加到您的 Gemfile 中:

gem "less-rails", "~> 2.2.6"
于 2012-12-02T15:39:00.423 回答