Error installing gems that use native extensions on Ubuntu, Ruby 1.9.2 via RVM

前端 未结 5 1781

I get an error while trying to install the ffi gem:

~ - 16:54>gem i ffi
Building native extensions.  This could take a while...
ERROR:  Error installing f         


        
5条回答
  •  误落风尘
    2020-12-25 09:31

    @Tom Morris - Tried your method and it worked fine.

    I inserted your path specs (modified - see below) into ~/.rvm/gems/ruby-1.9.2-p180/bin/rake after line 12.

    I modified the path specs so they are generic using ~ for the user home:

    ENV['GEM_HOME']=ENV['GEM_HOME'] || "~/.rvm/gems/ruby-1.9.2-p180"
    ENV['GEM_PATH']=ENV['GEM_PATH'] || "~/.rvm/gems/ruby-1.9.2-p180:~/.rvm/gems/ruby-1.9.2-p180@global"
    ENV['PATH']="~/.rvm/gems/ruby-1.9.2-p180/bin:~/.rvm/gems/ruby-1.9.2-p180@global/bin:~/.rvm/rubies/ruby-1.9.2-p180/bin:"+ ENV['PATH']
    

    Thanks for finding this fix!

提交回复
热议问题