我在root登录后使用rvm安装了ruby2.1.1。在另一个用户登录中,ruby 1.8.7正在使用。使用1.8.7 Redmin2.5.0可以很好地工作。但有了2.1.0
命令:
ruby script/rails server webrick -d -e production错误:
/usr/local/rvm/gems/ruby-2.1.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:252:in `require': /usr/local/rvm/gems/ruby-2.1.1/gems/vpim-0.695/lib/vpim/vcard.rb:679: invalid multibyte escape: /^\xFE\xFF/ (SyntaxError)
invalid multibyte escape: /^\xFF\xFE/
from /usr/local/rvm/gems/ruby-2.1.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:252:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:237:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.1.1/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:252:in `require'
from /usr/local/rvm/gems/ruby-2.1.1/gems/vpim-0.695/lib/vpim.rb:12:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.1@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
from /usr/local/rvm/gems/ruby-2.1.1@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/rvm/gems/ruby-2.1.1@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
from /usr/local/rvm/gems/ruby-2.1.1@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.1@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
from /usr/local/rvm/gems/ruby-2.1.1@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
from /usr/local/rvm/gems/ruby-2.1.1@global/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
from /home/dax/redmine-2.5.0/config/application.rb:7:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.1/gems/railties-3.2.17/lib/rails/commands.rb:53:in `require'
from /usr/local/rvm/gems/ruby-2.1.1/gems/railties-3.2.17/lib/rails/commands.rb:53:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.1.1/gems/railties-3.2.17/lib/rails/commands.rb:50:in `tap'
from /usr/local/rvm/gems/ruby-2.1.1/gems/railties-3.2.17/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'发布于 2014-04-17 09:05:38
使用以下命令尝试删除gem vpim:
gem uninstall vpim我试过安装而不需要这个宝石。
如果你真的需要那个创业板,编辑文件
/usr/local/rvm/gems/ruby-2.1.1/gems/vpim-0.695/lib/vpim/vcard.rb并将其放在第一个行中:
# encoding: US-ASCII发布于 2014-04-18 08:48:36
您的堆栈跟踪中提到的vpim宝石不是核心红地雷的要求。似乎您有一个自定义插件,它需要gem,并且与更新的Ruby不兼容(即>= 1.9)。
要解决这个问题,您需要更新或删除自定义插件。另外,现在不使用Ruby2.1可能是个好主意,但是Ruby2.0似乎在Ruby2.1.1中还有其他的问题(或者更广泛地说,是Rails 3.2)。
https://stackoverflow.com/questions/23127226
复制相似问题