2011-09-13 22 views
0

我已将我的应用程序部署到使用Capistrano和Passenger的远程计算机。该项目在GitHub上,我想在本地机器上修复一些错误修复。我已经同步了一切,并在本地机器上分支到一个新的“开发”分支。当我尝试我在开发时使用的简单的rails server命令时,出现与我的Gemfile中捆绑的gem有关的错误,例如, `require': no such file to load -- nokogiri/nokogiri (LoadError)。但是当我运行bundle show nokogiri时,它出现在/vendor/cache/ruby/1.9.1/gems/nokogiri-1.5.0使用捆绑软件将Rails应用程序返回到开发模式

也许这完全是错误的工作流程,但我如何才能到达本地机器上的开发模式,以便在将它们推送到部署的应用程序之前测试更改?

我的Gemfile:

source 'http://rubygems.org' 

gem 'rails', '3.0.10' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem '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 'nokogiri' 
# gem 'sqlite3-ruby', :require => 'sqlite3' 
gem 'nested_scaffold' 
gem 'rest-client' 
gem 'pony' 
gem 'mail' 
gem 'logger' 
gem 'json' 
gem 'gmail' 


# 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 
+0

您使用RVM? – corroded

+0

是的,在两台机器上。 – Paul

回答

1

我建议你删除.bundle目录(考虑备份无论是内部.bundle/config第一),并运行你的包重新安装命令。您可以执行cat .bundle/config以将其内容回显到您的终端(STDOUT)。

确保您通过执行rvm gemdirgem list来选择正确的宝石,以查看当前宝石中的所有宝石。

rails s -e development启动服务器(S短服务器)

+0

这样做,谢谢!这是我在推出新的生产更新后每次都必须做的事情吗? – Paul

+0

在我的开发系统中,我倾向于'bundle install --without = production',这样''production'中列出的所有宝石都会被忽略。如果您要添加'.bundle/config'的原始内容,我可以给您一个更好的建议。 –

相关问题