2

Sorry for the long title :). Having some Capistrano issues (though the problem could lay with bundler). Trying to deploy a Rails 3 app to Linode (Ubuntu 10.04 LTS). I thought it could be an RVM problem, but I'm still getting the problem w/o using RVM on the server.

Here's the error I get when I run 'cap deploy:update' (setup and check run fine)

  * executing "bundle install --gemfile /home/deploy/rails_apps/deed/releases/20101220040406/Gemfile --path /home/deploy/rails_apps/deed/shared/bundle --deployment --quiet --without development test"
    servers: ["myserver"]
    [myserver] executing command
 ** [out :: myserver] The path `/home/deploy/Documents/Rails_Projects/deed/vendor/gems` does not exist.
    command finished

Here's my deploy.rb

require 'bundler/capistrano'

set :domain, "mydomain"

set :application, "deed"
set :repository,  "deploy@#{domain}:~/deed.git"

set :scm, :git

# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :user, "deploy"
set :deploy_to, "/home/deploy/rails_apps/#{application}"
role :web, domain                          # Your HTTP server, Apache/etc
role :app, domain                          # This may be the same as your `Web` server
role :db,  domain, :primary => true # This is where Rails migrations will run

# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts
default_run_options[:pty] = true  # Must be set for the password prompt from git to work

set :default_environment, { 
  'PATH' => "/opt/ruby-enterprise-1.8.7-2010.02/bin:$PATH",
  'RUBY_VERSION' => 'ruby 1.8.7',
  'GEM_HOME' => '/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/',
  'GEM_PATH' => '/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/',
  'BUNDLE_PATH' => '/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/'
}

namespace :deploy do
  task :start do ; end
  task :stop do ; end
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end
kmurph79
  • 1,192
  • 3
  • 13
  • 28

2 Answers2

0

The problem was that I had

gem 'devise', :path => '~/Documents/Rails_Projects/deed/vendor/gems'

in my Gemfile as I wanted to change where Devise redirected after user creation, so I just edited the gem. Removing the hardcoded path in Gemfile solved the problem, though I couldn't find a path that would have worked.

Should I just override that Devise controller in my app, rather than referring to it locally then editing it?

kmurph79
  • 1,192
  • 3
  • 13
  • 28
0

Should I just override that Devise controller in my app, rather than referring to it locally then editing it?

Yes, absolutely. Look at the generators that come with Devise, specifically for views and controllers: http://rubydoc.info/github/plataformatec/devise/master/file/README.rdoc#Configuring_views. You'll want to create a users_controller and override devise's functionality in there.

cdmwebs
  • 933
  • 7
  • 13