无法安装Intercom.io gem Ubuntu 12.04 LTS

时间:2013-02-09 20:13:11

标签: ruby-on-rails

我正在尝试将intercom.io安装到我的rails应用程序中,但是在生成配置文件时我得到了这个:

/var/lib/gems/1.8/gems/intercom-rails-0.2.14/lib/intercom-rails/config.rb:13:in `send': undefined method `define_singleton_method' for IntercomRails::Config:Class (NoMethodError)
from /var/lib/gems/1.8/gems/intercom-rails-0.2.14/lib/intercom-rails/config.rb:13:in `config_reader'
from /var/lib/gems/1.8/gems/intercom-rails-0.2.14/lib/intercom-rails/config.rb:8:in `config_accessor'
from /var/lib/gems/1.8/gems/intercom-rails-0.2.14/lib/intercom-rails/config.rb:74
from /var/lib/gems/1.8/gems/intercom-rails-0.2.14/lib/intercom-rails.rb:9:in `require'
from /var/lib/gems/1.8/gems/intercom-rails-0.2.14/lib/intercom-rails.rb:9
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `require'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
from /var/lib/gems/1.8/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
from /home/ian/SB/config/application.rb:7
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/commands.rb:24:in `require'
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/commands.rb:24
from script/rails:6:in `require'
from script/rails:6

1 个答案:

答案 0 :(得分:1)

看起来你正在使用ruby 1.8,我们的宝石目前使用了ruby 1.9功能Object#define_singleton_method

我们在intercom/intercom-rails github repo上创建了一个问题来跟踪解决此问题。我会告诉你什么时候有新版本。

如果可能的话,it's recommended to run rails 3+ on ruby >= 1.9.3(这对我们来说至少意味着不从源头安装)。

感谢您引起我们的注意。