我正在尝试运行rails 2.3.2中的旧rails项目,使用的Ruby版本是1.9.3p-551。这里使用的数据库是Oracle。当我运行bundle install时,我收到以下错误:
sachin@ovm:~/Desktop/practice/AppMonitor$ bundle installFetching gem metadata from http://rubygems.org/...........
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Resolving dependencies...
Using rake 11.1.2
Using activesupport 2.3.2
Using activerecord-oracle_enhanced-adapter 1.3.2
Using iconv 1.0.4
Installing ruby-oci8 2.2.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1/ext/oci8
/home/sachin/.rvm/rubies/ruby-1.9.3-p551/bin/ruby -r ./siteconf20160413-5447-85ugks.rb extconf.rb
checking for load library path...
LD_LIBRARY_PATH is not set.
checking ld.so.conf... no
checking for cc... ok
checking for gcc... yes
checking for LP64... no
checking for sys/types.h... yes
checking for ruby header... ok
*** 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/sachin/.rvm/rubies/ruby-1.9.3-p551/bin/ruby
--with-instant-client
--without-instant-client
/home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:952:in `get_home': RuntimeError (RuntimeError)
from /home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:768:in `initialize'
from /home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in `new'
from /home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in `get'
from extconf.rb:22:in `<main>'
---------------------------------------------------
Error Message:
Set the environment variable ORACLE_HOME if Oracle Full Client.
Append the path of Oracle client libraries to LD_LIBRARY_PATH if Oracle Instant Client.
Backtrace:
/home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:952:in `get_home'
/home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:768:in `initialize'
/home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in `new'
/home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in `get'
extconf.rb:22:in `<main>'
---------------------------------------------------
See:
* http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-full-client.md for Oracle full client
* http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-instant-client.md for Oracle instant client
* http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-on-osx.md for OS X
* http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/report-installation-issue.md to report an issue.
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/sachin/.rvm/gems/ruby-1.9.3-p551/extensions/x86-linux/1.9.1/ruby-oci8-2.2.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/sachin/.rvm/gems/ruby-1.9.3-p551/gems/ruby-oci8-2.2.1 for inspection.
Results logged to /home/sachin/.rvm/gems/ruby-1.9.3-p551/extensions/x86-linux/1.9.1/ruby-oci8-2.2.1/gem_make.out
Using ruby-plsql 0.4.4
Using sqlite3 1.3.11
Using bundler 1.11.2
Using actionpack 2.3.2
Using activerecord 2.3.2
Using activeresource 2.3.2
An error occurred while installing ruby-oci8 (2.2.1), and
Bundler cannot continue.
Make sure that `gem install ruby-oci8 -v '2.2.1'` succeeds
before bundling.
我尝试重复 gem install ruby-oci8 -v'2.2.1',但错误相同。
请帮帮我。