Created
May 28, 2012 06:07
-
-
Save larryzhao/2817623 to your computer and use it in GitHub Desktop.
uninitialized constant Capistrano in rvm-capistrano
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load 'deploy' | |
# Uncomment if you are using Rails' asset pipeline | |
# load 'deploy/assets' | |
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'torquebox-capistrano-support' | |
require "rvm/capistrano" # Load RVM's capistrano plugin. | |
require 'bundler/capistrano' | |
set :rvm_ruby_string, 'jruby-1.6.7@myproject' | |
set :use_sudo, true | |
set :rvm_type, :system | |
set :stages, %w(staging production) | |
set :default_stage, "staging" | |
require 'capistrano/ext/multistage' | |
set :application, "entercamp" | |
# ssh to the deploy server | |
default_run_options[:pty] = true | |
# TorqueBox specific | |
set :torquebox_home, '/usr/local/rvm/gems/jruby-1.6.7@global/gems/torquebox-server-2.0.3-java' | |
set :jboss_home, '/usr/local/rvm/gems/jruby-1.6.7@global/gems/torquebox-server-2.0.3-java/jboss' | |
set :jruby_home, '/usr/local/rvm/rubies/jruby-1.6.7' | |
set :jboss_control_style, :binscripts | |
set :jruby_opts, '--1.9' | |
# setup scm: | |
set :repository, "[email protected]:myusername/myproject.git" | |
set :deploy_via, :remote_cache | |
set :scm_username, "myusername" | |
set :scm, :git | |
set :scm_verbose, "true" | |
set :branch, "master" | |
ssh_options[:forward_agent] = true | |
set(:releases_path) { File.join(deploy_to, version_dir) } | |
set(:shared_path) { File.join(deploy_to, shared_dir) } | |
set(:current_path) { File.join(deploy_to, current_dir) } | |
set(:release_path) { File.join(releases_path, release_name) } | |
set :deploy_to, "/var/deploy/#{application}" | |
namespace :rvm do | |
task :trust_rvmrc do | |
run "rvm rvmrc trust #{release_path}" | |
end | |
end | |
namespace :deploy do | |
task :start do | |
run "export LAUNCH_JBOSS_IN_BACKGROUND=1; rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'jruby-1.6.7@entercamp' -c 'jruby -S torquebox run'" | |
end | |
task :bootstrap do | |
run "cd #{release_path}; jruby -S bundle exec rake bootstrap:roughly RAILS_ENV=#{rails_env}" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jruby -S bundle exec rake RAILS_ENV=staging assets:precompile --trace | |
rake aborted! | |
uninitialized constant Capistrano | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rvm-capistrano-1.2.2/lib/rvm/capistrano.rb:3:in `(root)' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rvm-capistrano-1.2.2/lib/rvm/capistrano.rb:74:in `require' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rvm-capistrano-1.2.2/lib/rvm/capistrano.rb:74:in `require' | |
/usr/local/rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each' | |
/usr/local/rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require' | |
/usr/local/rvm/gems/jruby-1.6.7@global/gems/bundler-1.1.3/lib/bundler.rb:119:in `require' | |
/var/deploy/entercamp/releases/20120528054149/config/application.rb:13:in `(root)' | |
/var/deploy/entercamp/releases/20120528054149/config/application.rb:5:in `require' | |
/var/deploy/entercamp/releases/20120528054149/config/application.rb:5:in `(root)' | |
/var/deploy/entercamp/releases/20120528054149/Rakefile:25:in `load' | |
/var/deploy/entercamp/releases/20120528054149/Rakefile:25:in `load_rakefile' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `load_rakefile' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `run' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/gems/rake-0.9.2.2/bin/rake:33:in `(root)' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/bin/rake:19:in `load' | |
/var/deploy/entercamp/shared/bundle/jruby/1.9/bin/rake:19:in `(root)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rails', '3.2.1' | |
gem 'rake', '0.9.2.2' | |
gem 'jruby-openssl', :platform => :jruby | |
gem 'json', "~> 1.6.6" | |
gem 'mail', "2.4.3" | |
gem 'jquery-rails' | |
gem 'twitter-text' | |
gem "mongoid", "~> 2.4.7" | |
gem "bson_ext", "~> 1.5" | |
gem "mongoid-paperclip", :require => "mongoid_paperclip" | |
gem 'i18n-js' | |
gem 'activemerchant', :require => 'active_merchant' | |
gem "chronic", "~> 0.6.7" | |
gem 'chinese_pinyin' | |
gem 'devise' | |
gem "oa-oauth", :require => "omniauth/oauth" | |
gem "bcrypt-ruby", :require => "bcrypt" | |
gem 'delayed_job_mongoid' | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do | |
gem 'sass', '~> 3.1.18'#, git: 'git://github.com/nex3/sass.git' | |
gem 'sass-rails', '~> 3.2.3' | |
gem 'coffee-rails', '~> 3.2.1' | |
gem 'bootstrap-sass', '~> 2.0.3' | |
# See https://github.com/sstephenson/execjs#readme for more supported runtimes | |
gem "therubyrhino", "~> 1.73.1" | |
gem 'uglifier', '>= 1.0.3' | |
end | |
group :development, :test do | |
gem 'factory_girl_rails', '1.6.0' # use factories instead of fixtures | |
gem 'faker', '1.0.1' # easily create fake data for tests | |
gem 'rspec-rails', '2.8.1' # test framework | |
gem 'cucumber-rails', '1.2.1' # integration test framework | |
gem 'simplecov', '0.5.4' # test coverage report | |
gem 'json_spec', '0.8.0' # easier testing of JSON | |
gem 'database_cleaner', '0.7.1' # manage DB between tests | |
gem 'mongoid-rspec', '1.4.4' # rspec matchers for mongoid | |
gem 'autotest' | |
gem 'autotest-fsevent' | |
gem 'spork', '~> 1.0rc' | |
gem "capybara" | |
end | |
group :development do | |
gem 'ruby-debug', :platform => :jruby | |
gem 'columnize', :platform => :jruby | |
end | |
# To use ActiveModel has_secure_password | |
# gem 'bcrypt-ruby', '~> 3.0.0' | |
# To use Jbuilder templates for JSON | |
# gem 'jbuilder' | |
# Use unicorn as the web server | |
# gem 'unicorn' | |
# Deploy with Capistrano | |
gem "capistrano", "~> 2.12.0" | |
gem 'capistrano-ext', "~> 1.2.1" | |
gem "torquebox-capistrano-support" | |
gem 'rvm-capistrano' | |
# To use debugger | |
# gem 'ruby-debug' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment