簡體   English   中英

gem install sqlite3有效,捆綁安裝不起作用嗎?

[英]gem install sqlite3 works, bundle install doesn't?

root@localhost:~# which ruby
/usr/local/bin/ruby
root@localhost:~# which gem
/usr/local/bin/gem
root@localhost:~# ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
root@localhost:~# gem -v
1.7.2
root@localhost:~# 

root@localhost:~# gem install bundler
Successfully installed bundler-1.0.12
1 gem installed
......

root@localhost:~/www/blog# bundle install
Fetching source index for http://rubygems.org/
......

安裝帶有本機擴展名的sqlite3(1.3.3)/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:在`build_extensions中的塊中救援':錯誤:無法生成gem本機擴展。 (Gem :: Installer :: ExtensionBuildError)

  /usr/local/bin/ruby extconf.rb 

寶石文件將保留安裝在/root/www/blog/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.3中進行檢查。 結果從/usr/local/lib/ruby/site_ruby/1.9.1記錄到/root/www/blog/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out /rubygems/installer.rb:511: block in build_extensions' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in '中的block in build_extensions' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in / usr / local / lib / ruby​​中的每個/site_ruby/1.9.1/rubygems/installer.rb:486 build_extensions' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:159:in安裝中/ usr / local /lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/source.rb:96:in install'from install' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:55:in /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set中運行中.rb:12:在block in each' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in每個block in each' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in .rb:12:在/ usr中的每個/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12 each' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:44:in each' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:44:in運行中'從/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:8 each' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:44:in install' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/cli.rb:225:in /usr/local/lib/ruby/gems/1.9.1/gems/bundler -1.0.12 / lib / bundler / vendor / thor / task.rb:22: run' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor/invocation.rb:118:in來自/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor.rb:246:in中的run' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor/invocation.rb:118:in invoke_task' dispatch' from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor/base.rb:389:in / usr / local / lib /ruby/gems/1.9.1/gems/bundler-1.0.12/bin/bundle:13:in <top (required)>' from /usr/local/bin/bundle:19:in load'from / usr / local / bin / bundle:19:in`'

sqlite3-ruby gem需要libsqlite3-0和libsqlite3-dev。 要解決在Ubuntu上使用OpenSSL,nokogiri和SQLite3可能遇到的潛在問題,請運行以下命令(一行編寫):

sudo aptitude install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf

嘗試這里討論的解決方案: 在Ubuntu上sqlite3-ruby安裝錯誤

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM