0

我使用 rails new 创建了一个新的 Rails 项目

当我尝试使用 rails server 启动它时,我得到以下输出:

root@debian:/home/marcel/workspaces/rails/sample# rails server /usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in require': cannot load such file -- sqlite3/sqlite3_native (LoadError) from /usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:inrescue在'来自/usr/local/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/lib/sqlite3.rb:2:in<top (required)>' from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in要求'来自/usr/local/lib/ruby/gems/2.0 .0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in block (2 levels) in require' from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:ineach' 来自 /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/ bundler/runtime.rb:70:in block in require' from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:ineach' from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in require' from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:inrequire' from / home/marcel/workspaces/rails/sample/config/application.rb:7:in <top (required)>' from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:inrequire' 来自 /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands .rb:76:inblock in <top (required)>' from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in从 /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in 中点击'<top (required)>' from bin/rails:4:in来自 bin/rails:4:in `'

我在用着

  • ruby 2.0.0p247(2013-06-27 修订版 41674)[x86_64-linux]
  • 宝石 1.8.25
  • 导轨 4.0.0

这是我的 Gemfile :

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'

# Use sqlite3 as the database for Active Record
gem 'sqlite3', '1.3.7'
gem 'sqlite3-ruby', :require => 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '2.1.1'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails', '2.2.1'

我能做些什么来解决这个问题?

提前致谢

4

2 回答 2

0

据我所知,您不需要 sqlite3-ruby gem。

于 2013-08-02T09:00:45.327 回答
0

你可能没有在你的 debian 上安装 libsqlite3-dev 包。

$ sudo apt-get install libsqlite3-dev
于 2013-08-02T09:41:37.420 回答