I’ve got a strange behaviour on my production server: I deploy my Rails 3 application via Capistrano to the production server. The Capistrano script restarts passenger at the end of deployment. When I open the application I see a passenger error message:
Could not find autotest-fsevent-0.2.4 in any of the sources
(Bundler::GemNotFound)
Of course autotest-fsevent is not installed in my production environment (and even can’t be installed on Ubuntu…)
The environment is set in apache’s virtualhost:
<VirtualHost *>
PassengerMinInstances 1
ServerName test.myapp.de
DocumentRoot /var/www/myapp/current/public
RailsEnv production
RackEnv production
<Directory /var/www/myapp/current/public/>
Options -Indexes
AllowOverride None
Order deny,allow
Deny from none
Allow from all
AddOutputFilterbyType DEFLATE text/html
FileEtag none
</Directory>
LogLevel warn
ErrorLog /var/www/myapp/shared/log/error.log
CustomLog /var/www/myapp/shared/log/access.log combined
</VirtualHost>
Here is my Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.6'
gem 'jquery-rails'
gem 'mysql'
gem 'simple-navigation'
gem 'geokit'
gem 'geokit-rails3', :git => "git://github.com/loosecubes/geokit-rails3.git"
gem 'validates_timeliness', '~> 3.0.2'
gem 'delocalize'
gem 'prawn'
group :development do
gem 'rspec-rails', '2.5.0'
gem 'faker', '0.3.1'
#gem 'ruby-debug19'
gem 'ruby-debug'
gem 'autotest', '4.4.6'
gem 'autotest-rails-pure', '4.1.2'
gem 'autotest-fsevent', '0.2.4'
gem 'autotest-growl', '0.2.9'
end
group :test do
gem 'rspec', '2.5.0'
gem 'rcov'
gem 'webrat', '0.7.1'
gem 'factory_girl_rails', '1.0'
end
Why does passenger (or bundler) think it needs ALL gems instead only the gems for production environment?
Thanks for your help!
Are you using the bundler capistrano recipes?
Make sure this is in your
config/deploy.rbBasically it will invoke bundle with the
--without development testoption, which should only install the production gems. If you are just doing a regularbundle, it will install try to install the gems for all environments.