我在 environment.rb 中添加了一句 config.gem 'tiny_mce',具体如下:
require File.expand_path('../application', FILE)
MyBlog::Application.initialize! config.gem 'tiny_mce'
一启动服务就出现如下错误:
/home/villins/MyBlog/config/environment.rb:6:in <top (required)>': undefined local variable or method
config' for main:Object (NameError)
from /home/villins/MyBlog/config.ru:4:in require'
from /home/villins/MyBlog/config.ru:4:in
block in
instance_eval'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in
initialize'
from /home/villins/MyBlog/config.ru:1:in new'
from /home/villins/MyBlog/config.ru:1:in
'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in eval'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in
parse_file'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:200:in app'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands/server.rb:46:in
app'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:301:in wrapped_app'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:252:in
start'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands/server.rb:70:in start'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands.rb:55:in
block in '
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands.rb:50:in tap'
from /home/villins/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.3/lib/rails/commands.rb:50:in
'
from script/rails:6:in require'
from script/rails:6:in
'
请问有什么解决方法吗?