2011-08-31 115 views
2

試圖運行在Ubuntu 10.10第一個項目,我得到這個:RoR安裝:運行「捆綁安裝」不起作用?

[email protected]:~/Documents/tickets$./script/rails server 
Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your Gemfile. 
Run `bundle install` to install missing gems. 

嘛,後來我寫:

[email protected]:~/Documents/tickets$ bundle install 

,並在安裝過程中得到這樣的:

 /usr/bin/ruby1.8 extconf.rb 
checking for sqlite3.h... no 
sqlite3.h is missing. Try 'port install sqlite3 +universal' 
or 'yum install sqlite3-devel' and check your shared library search path (the 
location where your sqlite3 shared library is located). 
*** 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. 

所以,我試過這個:

sudo yum install sqlite3-devel 

,並得到這樣的:

Setting up Install Process 
    No package sqlite3-devel available. 
    Nothing to do 

爲什麼?我正在運行Rails 3.1,順便說一句。

回答

0

由於您使用的是yum,我繼續前進,並猜測您使用的是Fedora。然後,我用Google搜索「的Fedora sqlite3的」,發現blog post該建議是:

sudo yum install sqlite-devel 

聽起來像寶石沒有完全正確的包名。給這一個去:)

+0

其實,我使用Ubuntu 10.10。寫在帖子的第一行。 – andandandand

+0

這個yum調用讓我得到了和我一樣的輸出結果:沒有包sqlite-devel可用。 無事可做 – andandandand

+1

嘗試: sudo apt-get install libsqlite3-dev –

3

嘗試:sudo apt-get install libsqlite3-dev