You are not logged in.
Good day!
I want to setup deploymant of my application to your server with capistrano.
I found an article about how it's possible on your servers and do all steps: http://mega.blaix.com/2007/8/29/capistr … webfaction
A've successfully pass deploy:setup
deploy:check say to me: You appear to have all necessary dependencies installed
but when I try to deploy:cold I have:
[login_name@login_name.webfactional.com] executing command
** [out :: login_name@login_name.webfactional.com] (in /home/login_name/webapps-releases/app_name/releases/20080529215304)
** [out :: login_name@login_name.webfactional.com] Missing the Rails gem. Please `gem install -v= rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION touse the latest version installed.
** [out :: login_name@login_name.webfactional.com]
command finished
command "cd /home/login_name/webapps-releases/app_name/releases/20080529215304; rake RAILS_ENV=production db:migrate" failed on login_name@login_name.webfactional.com
But on the server after that I can find directory /home/login_name/webapps-releases/app_name/releases/20080529215304 where the latest sources from SVN is.
Also if I run command "cd /home/login_name/webapps-releases/app_name/releases/20080529215304; rake RAILS_ENV=production db:migrate" manually through SSH, it will finished OK.
After this deploy:migrations finished with the same errors.
I installed my own ruby (+rails, capistrano, etc...) as described in your knowledgbase.
So what could be the reason of this problem?
Thanks!
Offline
Try setting your GEM_PATH bash environment variable to the location of your gems, eg "export GEM_PATH=/path/to/your/gems"
You might also want to ensure that any relevant scripts (eg rake) are using your installed version of Ruby.
Hope that helps!
Offline
I've add this string to ~/.bashrc:
/home/login_name/ruby1.8/lib/ruby/gems/1.8/gems
but it doesn't helps.
How can I ensure that rake used from my own installation?
Via SSH I see:
[login_name@webXX ~]$ which rake
~/ruby1.8/lib/ruby/gems/1.8/bin/rake
Any other ideas?
Offline
zozo wrote:
I've add this string to ~/.bashrc:
/home/login_name/ruby1.8/lib/ruby/gems/1.8/gems
but it doesn't helps.
Did you log out and log back in after making the change?
if so, what is the exact command you are running that is failing?
zozo wrote:
How can I ensure that rake used from my own installation?
Via SSH I see:
[login_name@webXX ~]$ which rake
~/ruby1.8/lib/ruby/gems/1.8/bin/rake
Any other ideas?
It looks like you've got the correct rake, maybe inspect the contents of ~/ruby1.8/lib/ruby/gems/1.8/bin/rake to ensure that it's using the correct Ruby?
Offline
Yes, I did relogined, but as I understant - it's not important - I'm try to deploy from local machine, so in any way while deploying, there is new login.
How can I check which version of ruby used by my instance of rake?
Thanks?
Offline
I've solved the problem.
You was right - the reason is that rake used not from my ruby.
The solution is to add to deply script:
set :rake, "/home/login_name/ruby1.8/lib/ruby/gems/1.8/bin/rake"
Thanks for idea!
Offline
I had this same problem, but the above solution didn't solve it for me.
I found a thread on the Capistrano Google Group which worked (http://groups.google.com/group/capistra … 9da2618709).
Basically, you have to set a default path in your Capistrano deploy.rb, such as
default_environment["PATH"] = "my_path"
I just copied the content of 'echo $PATH' from the command line and pasted it into the deploy.rb file.
Hope that helps someone!
Offline
Not sure if this will help the original poster, but I wrote a quick blog about how I got Capistrano working on WebFaction.
http://blog.localkinegrinds.com/2008/09 … ebfaction/
Offline