2011-06-14 109 views
1

當我開始我的鐵路服務器項目它給像Rails的服務器錯誤

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

一個錯誤,當我去捆綁安裝送禮者另一個錯誤

[email protected]:~/sites/tasks$ sudo bundle install 
Fetching source index for http://rubygems.org/ 
Using rake (0.9.2) 
Using abstract (1.0.0) 
Using activesupport (3.0.8) 
Using builder (2.1.2) 
Using i18n (0.5.0) 
Using activemodel (3.0.8) 
Using erubis (2.6.6) 
Using rack (1.2.3) 
Using rack-mount (0.6.14) 
Using rack-test (0.5.7) 
Installing tzinfo (0.3.28) 
Using actionpack (3.0.8) 
Using mime-types (1.16) 
Using polyglot (0.3.1) 
Using treetop (1.4.9) 
Using mail (2.2.19) 
Using actionmailer (3.0.8) 
Using arel (2.0.10) 
Using activerecord (3.0.8) 
Using activeresource (3.0.8) 
Using bundler (1.0.15) 
Using thor (0.14.6) 
Using railties (3.0.8) 
Using rails (3.0.8) 
Installing sqlite3 (1.3.3) with native extensions /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

/usr/bin/ruby1.8 extconf.rb 
extconf.rb:3:in `require': no such file to load -- mkmf (LoadError) 
from extconf.rb:3 


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.3 for inspection. 
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out 
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:446:in `each' 
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:446:in `build_extensions' 
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:198:in `install' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/source.rb:101:in `install' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in `preserve_paths' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/source.rb:91:in `install' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in `run' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in `with_build_args' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in `run' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in `run' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in `install' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/cli.rb:222:in `install' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `send' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `run' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in `dispatch' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in `start' 
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.15/bin/bundle:13 
from /usr/bin/bundle:19:in `load' 
from /usr/bin/bundle:19 
+0

如果我的回答沒有幫助,你能分享下問題? – dimitarvp 2011-06-15 08:03:55

+0

sahil @ sahil-M:〜/ sites/tasks $ sudo su root @ sahil -M:/ home/sahil/sites/tasks#apt-get install ruby​​1.8-dev 正在讀取軟件包列表...完成 Building依賴關係樹 閱讀狀態信息...完成 ruby​​1.8-dev已經是最新的版本。 0升級,0新安裝,0刪除和0未升級。 root @ sahil -M:/ home/sahil/sites/tasks#exit exit sahil @ sahil-M:〜/ sites/tasks $ rails s 找不到gem'sqlite3(> = 0,runtime)'in您的Gemfile中列出的任何寶石來源。 運行'bundle install'安裝缺失的寶石。 – 2011-06-15 19:12:55

回答

1

試試這個

sudo apt-get install ruby1.8-dev libsqlite3-ruby libsqlite3-dev 
1

您需要安裝ruby1.8-dev根據需要在發行版中打包。

在Ubuntu/Debian,請登錄爲控制檯根這樣的安裝:

apt-get install ruby1.8-dev 

或者,它可能只是ruby-dev。如果ruby1.8-dev不起作用,請嘗試。

+0

sahil @ sahil-M:〜/ sites/tasks $ sudo su root @ sahil -M:/ home/sahil/sites/tasks#apt-get install ruby​​1.8-dev 正在讀取軟件包列表...完成 構建依賴關係樹 正在讀取狀態信息...完成 ruby​​1.8-dev已經是最新版本。 0升級,0新安裝,0刪除和0未升級。 root @ sahil -M:/ home/sahil/sites/tasks#exit exit sahil @ sahil-M:〜/ sites/tasks $ rails s 找不到gem'sqlite3(> = 0,runtime)'in您的Gemfile中列出的任何寶石來源。 運行'bundle install'安裝缺少的寶石.' – 2011-06-15 19:15:10