我正在尝试将 twitter/bootstrap 集成到我的第一个 rails 应用程序中(按照这篇文章http://www.opinionatedprogrammer.com/2011/11/twitter-bootstrap-on-rails/),现在我收到了这个错误无法理解/解决。
new-host:Talker Talker$ rails s
=> Booting Thin
=> Rails 3.2.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Projects/Talker/config/environment.rb:4:in <top (required)>': undefined method
Initialize' for Rails:Module (NoMethodError)
from /Projects/Talker/config.ru:4:in require'
from /Projects/Talker/config.ru:4:in
block in '
from /.rvm/gems/ruby-1.9.2-p318/gems/rack-1.4.1/lib/rack/builder.rb:51:in instance_eval'
from /.rvm/gems/ruby-1.9.2-p318/gems/rack-1.4.1/lib/rack/builder.rb:51:in
initialize'
from /Projects/Talker/config.ru:1:in new'
from /Projects/Talker/config.ru:1:in
'
from /.rvm/gems/ruby-1.9.2-p318/gems/rack-1.4.1/lib/rack/builder.rb:40:in eval'
from /.rvm/gems/ruby-1.9.2-p318/gems/rack-1.4.1/lib/rack/builder.rb:40:in
parse_file'
from /.rvm/gems/ruby-1.9.2-p318/gems/rack-1.4.1/lib/rack/server.rb:200:in app'
from /.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/commands/server.rb:46:in
app'
from /.rvm/gems/ruby-1.9.2-p318/gems/rack-1.4.1/lib/rack/server.rb:301:in wrapped_app'
from /.rvm/gems/ruby-1.9.2-p318/gems/rack-1.4.1/lib/rack/server.rb:252:in
start'
from /.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/commands/server.rb:70:in start'
from /.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/commands.rb:55:in
block in '
from /.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/commands.rb:50:in tap'
from /.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/commands.rb:50:in
'
from script/rails:6:in require'
from script/rails:6:in
'
这就是我的环境.rb 的样子
require File.expand_path('../application', FILE)
Rails.Initialize.run do |config|
config.gem 'mongo'
config.gem "mongo_mapper"
end
Talker::Application.initialize!
我对 Rails 很陌生,因此非常感谢任何帮助/指导!