Ruby on rails 为什么赢了';我的Rails服务器不能在OSXLion上运行吗?
我是一名初级程序员,我正在尝试通过命令行运行Rails服务器。我在命令行中键入“rails服务器”,并收到以下错误:Ruby on rails 为什么赢了';我的Rails服务器不能在OSXLion上运行吗?,ruby-on-rails,sqlite,Ruby On Rails,Sqlite,我是一名初级程序员,我正在尝试通过命令行运行Rails服务器。我在命令行中键入“rails服务器”,并收到以下错误: Could not find gem 'sqlite3-ruby (= 1.2.5, runtime)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems. 收到此错误后,我运行“bundle install”。运行“bun
Could not find gem 'sqlite3-ruby (= 1.2.5, runtime)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.
收到此错误后,我运行“bundle install”。运行“bundle install”后,我在命令行中键入“rails服务器”,并收到相同的错误:
Could not find gem 'sqlite3-ruby (= 1.2.5, runtime)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.
这是我的档案副本:
source 'http://rubygems.org'
gem 'rails', '3.0.9'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
有人能帮我安装并运行rails服务器吗?谢谢 我想我很久以前就遇到过这个错误——它与在我的bin或lib文件夹中,在我的计算机的ruby dir或类似的东西中使用sqlite.dll有关。我认为Michael Hartl的教程提到了一些相关内容。尝试删除GEM文件中的“1.2.5”,使行看起来像:
gem 'sqlite3-ruby', :require => 'sqlite3'
然后跑
bundle install
再说一遍,你刚才试过了吗
gem 'sqlite3'
您可能还希望确认您的gem已正确安装在您的环境中:
gem list
您还可以获得有关特定宝石的更多信息:
gem specification sqlite3-ruby
我假设您在安装其他gem时没有问题-也就是说,您不需要为bundle安装设置http_代理环境变量。对于投票关闭它的人来说,这不是服务器问题。我正在阅读Michael Hartl的教程,似乎无法修复它。谢谢你的回复!是的,对不起,我帮不上忙了——如果我遇到了这个错误并找到了解决方案,我会让你知道:)谢谢你的回答。我试着按照你的建议去做,但还是没用。我想我会尝试使用web开发环境。