2015-06-13 90 views
0

當我試圖安裝Ruby - gem install escape_utils失敗,並與erorrs?

gem install escape_utils -v '0.3.2'

它給了我下面,我不知道如何解決 我使用

ruby --version 
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux] 

rails -v 
Could not find escape_utils-0.3.2 in any of the sources 
Run `bundle install` to install missing gems. 

錯誤試圖安裝時,我得到的錯誤是

gem install escape_utils -v '0.3.2' 
Building native extensions. This could take a while... 
ERROR: Error installing escape_utils: 
     ERROR: Failed to build gem native extension. 

    /usr/local/rvm/rubies/ruby-2.2.2/bin/ruby -r ./siteconf20150613-4082-zkyiyc.rb extconf.rb 
creating Makefile 

make "DESTDIR=" clean 

make "DESTDIR=" 
compiling houdini_xml_e.c 
compiling buffer.c 
compiling escape_utils.c 
escape_utils.c: In function ‘rb_eu_escape_html_as_html_safe’: 
escape_utils.c:126: error: assignment of read-only member ‘klass’ 
make: *** [escape_utils.o] Error 1 

make failed, exit code 2 

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.2.2/gems/escape_utils-0.3.2 for inspection. 
Results logged to /usr/local/rvm/gems/ruby-2.2.2/extensions/x86_64-linux/2.2.0/escape_utils-0.3.2/gem_make.out 
+0

是否有你嘗試安裝v0.3.2的原因?使用更新的版本可能會有更好的運氣https://rubygems.org/gems/escape_utils – Exupery

+0

你在'/usr/local/rvm/gems/ruby-2.2.2/extensions/x86_64-linux/2.2.0/escape_utils-0.3.2/gem_make.out'?它可能會告訴你更多關於錯誤的信息。 –

+0

我需要這個來安裝開源結算應用程序。它要求我安裝該版本。 – mahen3d

回答

0

這是e scape_utils本身。您應該編輯Gemfile.lock文件並將escape_utils (0.3.2)更改爲escape_utils (1.1.0)