我從生產中複製了該應用程序,並進行了bundle install以安裝生產版本中而不是本地機器上的所有缺失gem。無法構建不同版本的gem本機擴展ruby racer gem
Gem.lock文件具有rubyracer版本'0.10.1'。所以,當它試圖使用捆綁安裝安裝此版本時出現以下錯誤。
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/user/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/user/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
extconf.rb:15:in `<main>': undefined method `include_path' for Libv8:Module (NoMethodError)
Gem files will remain installed in /home/user/.rvm/gems/ruby-1.9.3-p392/gems/therubyracer-0.10.1 for inspection.
Results logged to /home/user/.rvm/gems/ruby-1.9.3-p392/gems/therubyracer-0.10.1/ext/v8/gem_make.out
由於出現此錯誤,我無法在本地計算機的生產版本代碼上運行腳手架命令。請幫助我。
我們可以編輯gemfile.lock以刪除「therubyracer(0.10.1)」,然後運行命令generate scaffold,然後在使用生成腳手架後放回更改嗎?
編輯:
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/vsadhu/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
extconf.rb:14:in `<main>': undefined method `include_path' for Libv8:Module (NoMethodError)
假設'紅寶石racer'是在生產組試圖'捆綁安裝--without production' – j03w
@ j03w ..真但是當我導航到我的生產服務器並運行生成腳手架時,它不會運行,原因是gemfile.lock包含0.10.1版本的ruby racer。並說失蹤 – user2569524
你當地的環境是什麼?你有沒有檢查'/ home/user/.rvm/gems/ruby-1.9.3 -p392/gems/therubyracer-0.10.1/ext/v8/gem_make.out'並查看缺少的內容? – j03w