我正在尝试在Fedora 19机器上安装Catarse.me,准备推送到Heroku。
我成功运行了bundle install。但是当我尝试
时rake db:migrate
我收到此错误
[root@acer]$ rake db:migrate
rake aborted!
undefined local variable or method `ext_dir' for #<Gem::Specification:0x450c8ce RedCloth-4.2.9>
/home/user/rails/catarse/config/boot.rb:7:in `<top (required)>'
/home/user/rails/catarse/config/application.rb:1:in `<top (required)>'
/home/user/rails/catarse/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
我已经单独检查了这些文件中的每一个,并且在注明的行上有一个对
的调用variablename = File.expand_path('../path/to/Gemfile', __FILE__)
更正堆栈跟踪指向book.rb中的第7行
Bundler.setup
我用谷歌搜索,但唯一相关的打击是this StackOverflow question,但其情况和答案与我的问题无关。
我很感激帮助。
正在运行rake db:migrate -- trace
rake aborted!
undefined local variable or method `ext_dir' for #<Gem::Specification:0x4700158 RedCloth-4.2.9>
/usr/local/share/ruby/site_ruby/rubygems/specification.rb:1887:in `method_missing'
/usr/share/gems/gems/bundler-1.3.1/lib/bundler/rubygems_ext.rb:42:in `load_paths'
/usr/share/gems/gems/bundler-1.3.1/lib/bundler/runtime.rb:37:in `block in setup'
/usr/share/gems/gems/bundler-1.3.1/lib/bundler/runtime.rb:19:in `setup'
/usr/share/gems/gems/bundler-1.3.1/lib/bundler.rb:120:in `setup'
/home/mei/rails/catarse/config/boot.rb:7:in `<top (required)>'
/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/mei/rails/catarse/config/application.rb:1:in `<top (required)>'
/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/mei/rails/catarse/Rakefile:4:in `<top (required)>'
/usr/local/share/gems/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load'
/usr/local/share/gems/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/share/gems/gems/rake-10.1.0/lib/rake/application.rb:637:in `raw_load_rakefile'
/usr/local/share/gems/gems/rake-10.1.0/lib/rake/application.rb:94:in `block in load_rakefile'
/usr/local/share/gems/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/share/gems/gems/rake-10.1.0/lib/rake/application.rb:93:in `load_rakefile'
/usr/local/share/gems/gems/rake-10.1.0/lib/rake/application.rb:77:in `block in run'
/usr/local/share/gems/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/share/gems/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/usr/local/share/gems/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/bin/rake:23:in `load'
/bin/rake:23:in `<main>'
答案 0 :(得分:3)
通过你的追踪,它似乎是一个捆绑问题,
正在运行
gem update bundler
应该修复它。