Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 缺少SQLITE3Ruby。但不是真的_Ruby On Rails_Ruby_Ruby On Rails 3_Ruby On Rails 4_Sqlite - Fatal编程技术网

Ruby on rails 缺少SQLITE3Ruby。但不是真的

Ruby on rails 缺少SQLITE3Ruby。但不是真的,ruby-on-rails,ruby,ruby-on-rails-3,ruby-on-rails-4,sqlite,Ruby On Rails,Ruby,Ruby On Rails 3,Ruby On Rails 4,Sqlite,背景细节:我在Ubuntu 12.04中运行Ruby 2.2.0和Rails 4.1.0 当我键入rails-v时,我会收到错误消息: Could not find gem 'sqlite3-ruby (= 1.3.1) ruby' in the gems available on this machine. Try running `bundle install`. 当我键入捆绑安装时: 我得到: Fetching gem metadata from http://rubygems.org/

背景细节:我在Ubuntu 12.04中运行Ruby 2.2.0和Rails 4.1.0

当我键入
rails-v
时,我会收到错误消息:

Could not find gem 'sqlite3-ruby (= 1.3.1) ruby' in the gems available on this machine.
Try running `bundle install`.
当我键入
捆绑安装时

我得到:

Fetching gem metadata from http://rubygems.org/...........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails (= 3.0.1) ruby depends on
      bundler (~> 1.0.0) ruby

  Current Bundler version:
    bundler (1.8.4)

This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
最糟糕的是,它仍然显示Rails(3.0.1),这不是我计算机上Rails的当前版本

我试图通过键入以下内容安装sqllite3 ruby:

sudo apt-get install libsqlite3-dev
但我得到:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libsqlite3-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  ruby-builder ruby-blankslate ruby-text-format ruby-activesupport-2.3 rubygems ruby-i18n rake libjs-prototype libmemcache-client-ruby1.8
  ruby-actionmailer-2.3 libmemcache-client-ruby ruby-activerecord-2.3 ruby-rchardet ruby-rack ruby-tmail libjs-scriptaculous libtzinfo-ruby1.8
  ruby-rails-2.3 ruby-activeresource-2.3 libtzinfo-ruby ruby-actionpack-2.3
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 455 not upgraded.
更新:


检查文件中的rails版本。您的应用程序似乎是用rails 3.0.1构建的。因此,
bundle install
希望安装gem文件中请求的所有gem版本。正如终端中的消息所述,rails 3.0.1依赖于bundler 1.0.0,但您当前安装了bundler 1.8.4


你有两种可能:要么将你现有的应用升级到你的集成rails版本(4.2.0),要么将所有安装的rails相关gems降级到rails 3.0.1

再次:检查您的文件。您的应用程序正在寻找sqlite3 ruby版本1.3.1,但您安装了版本1.3.3。gem文件中gem的版本与实际安装的gem版本不一致。