no such file to load -- rubygems

Subscribe to no such file to load -- rubygems 7 post(s), 2 voice(s)

 
Avatar v.pacher 21 post(s)

Hello, I’ve installed the starling and daemons gem on my brightbox and also the workling plugin and daemons generator. When I try to start the client of either the daemon or the workling client I get the error message require: no such file to load — rubygems. It works just fine on my ubuntu box.
I looked at the rubygems site and it says there that it looks like as if the executing copy of ruby doesn’t have rubygems installed, however all the rest of my app works fine.
Any ideas or do I need to reinstall ruby?
Volker

 
Avatar David Smalley Administator 36 post(s)

can you try doing which ruby and which gem and see if they’re both in the same path and what paths are returned?

 
Avatar v.pacher 21 post(s)

i’ve just done that (found it on another site) and they were in two different paths and i deleted the ruby in the /usr/local …. path
it is missing in your instruction http://wiki.brightbox.co.uk/docs:ruby:1.8.6 that the new ruby will end up in a different location.
It seems to be working fine now. fingers crossed.
On another note, where is the best place to put the daemon and workling_client start commands on a deploy?

thanks for your help
Volker

 
Avatar David Smalley Administator 36 post(s)

You can add custom tasks to your Capistrano recipe and set them to run before or after other tasks. E.g. your daemon and worklings might be…

after "deploy:restart", "custom:restart"

namespace :custom do

  task :restart do
    run "cd #{release_path} && script/daemon restart"
  end

end

You can find plenty examples of how to write your own Capistrano tasks online.

 
Avatar v.pacher 21 post(s)

thanks for that, does the environment need to specified or does it default to production on deploy?
like run “RAILS_ENV=production cd #{release_path} && lib/daemons/parser_ctl restart”
Volker

 
Avatar David Smalley Administator 36 post(s)

Yeah you need to specify the Rails environment.

It’s available as a local variable in deploy.rb so you could do…

run “RAILS_ENV=#{rails_env} cd #{release_path} && lib/daemons/parser_ctl restart”

 
Avatar v.pacher 21 post(s)

thanks for that, I think that answers all my questions for the time being….
Volker

Signup or login to contribute