Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6723145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:32:02+00:00 2026-05-26T09:32:02+00:00

I am using Ruby on Rails 3.1.0 and the Capistrano gem and I created

  • 0

I am using Ruby on Rails 3.1.0 and the Capistrano gem and I created a migration file in order to change database table column names. When in my local machine I run the rake db:migrate command (in development mode) it works, but I would like to make effective these changes on the remote server in production mode. My problem is: if I run the Capistrano command cap deploy:migrate I get the following error message in the production log file on the remote server :

* executing "cd /<my_application_path>/releases/20111025205951 && rake RAILS_ENV=production  db:migrate"
  servers: ["<my_application_IP>"]
  [<my_application_IP>] executing command
 ** [out :: <my_remote_server_IP>] (in /<my_application_path>/releases/20111025205951)
*** [err :: <my_remote_server_IP>] rake aborted!
*** [err :: <my_remote_server_IP>] uninitialized constant Rake::DSL
*** /usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in `<class:TaskLib>'
*** ...

How can I solve the problem? Is it related to using Ruby version 1.9.1 as outputted in the above error message?


Note: If I run the ruby -v command

# on the local machine (MacOS running Snow Leopard 10.6.7) I get
>> ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.7.0]
# on the remote machine (Linux running Ubuntu 10.04 LTS) I get
>> ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

UPDATE for @Simone Carletti

After I added the require 'bundler/capistrano' at the top of the deploy.rb file and after I run the cap deploy:migrations command I get the following error:

...
* executing "cd /<my_application_path>/releases/20111026132212 && bundle install --gemfile /<my_application_path>/releases/20111026132212/Gemfile --path /<my_application_path>/shared/bundle --deployment --quiet --without development test"
  servers: ["<my_remote_server_IP>"]
  [<my_remote_server_IP>] executing command
** [out :: <my_remote_server_IP>] Some gems seem to be missing from your vendor/cache directory.
** [out :: <my_remote_server_IP>] Could not find libv8-3.3.10.2 in any of the sources
   command finished in 2554ms
failed: "sh -c 'cd /<my_application_path>/releases/20111026132212 && bundle install --gemfile /<my_application_path>/releases/20111026132212/Gemfile --path /<my_application_path>/shared/bundle --deployment --quiet --without development test'" on <my_remote_server_IP>

What does this mean? It may be related to the last part (that is, the N.B. part) of the following text? If so, what I should do?

When I run the cap -e bundle:install command (from the official documentation) I get:

------------------------------------------------------------
cap bundle:install
------------------------------------------------------------
Install the current Bundler environment. By default, gems will be installed to
the shared/bundle path. Gems in the development and test group will not be
installed. The install command is executed with the --deployment and --quiet
flags. If the bundle cmd cannot be found then you can override the bundle_cmd
variable to specifiy which one it should use.

You can override any of these defaults by setting the variables shown below.

N.B. bundle_roles must be defined before you require 'bundler/capistrano' in
your deploy.rb file.

  set :bundle_gemfile,  "Gemfile"
  set :bundle_dir,      File.join(fetch(:shared_path), 'bundle')
  set :bundle_flags,    "--deployment --quiet"
  set :bundle_without,  [:development, :test]
  set :bundle_cmd,      "bundle" # e.g. "/opt/ruby/bin/bundle"
  set :bundle_roles,    {:except => {:no_release => true}} # e.g. [:app, :batch]

Note: The cap deploy:migrations command created an empty /<my_application_path>/shared/bundle/ruby/1.9.1 directory with a 755 pemission.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:32:02+00:00Added an answer on May 26, 2026 at 9:32 am

    This is the guilty.

    rake RAILS_ENV=production  db:migrate
    

    You should run

    bundle exec rake RAILS_ENV=production  db:migrate
    

    Make sure you are including the bundler/capistrano recipes in your deploy.rb file.

    require 'bundler/capistrano'
    

    These recipes will change the command for you. See Automatic deployment with Capistrano.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Ruby on Rails, the Capistrano gem and git. Long time ago
I am using Ruby on Rails and the Capistrano gem. I would like to
I am using Ruby on Rails 3.1.0 and the Capistrano gem. As wrote in
using Ruby on Rails 2.3.2, since I already created Scaffold for Story, so instead
I am using ruby on rails with a MySQL backend. I have a table
I have created a blog application using Ruby on Rails which includes the ability
I am using capistrano to deploy my Ruby on Rails project. I am on
I am using Capistrano to deploy a ruby on rails project. I am attempting
Using Ruby on Rails 3's new routing system, is it possible to change the
Using Ruby on Rails, if I do a gem help install a part of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.