Skip to content

Instantly share code, notes, and snippets.

View plentz's full-sized avatar

Diego Plentz plentz

View GitHub Profile
@plentz
plentz / deploy.rb
Created May 17, 2012 23:29
environments files should be inside a folder named deploy.
require "capistrano_colors"
require "railsless-deploy"
set :default_stage, "dev"
require "capistrano/ext/multistage"
set :use_sudo, false
set :application, "bar"
set :user, "www-data"
set :group, "www-data"
~/Projects/opensource/jruby_report (master) $ gem install yajl-ruby
Building native extensions. This could take a while...
ERROR: Error installing yajl-ruby:
ERROR: Failed to build gem native extension.
/Users/plentz/.rvm/rubies/jruby-1.6.7/bin/jruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library very well.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
creating Makefile
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
require "rvm/capistrano" # http://beginrescueend.com/integration/capistrano/
require "bundler/capistrano"
require "capistrano_colors"
require "new_relic/recipes"
set :use_sudo, false
`rvm info`
set :rvm_ruby_string, `rvm current`
~/Projects/my/forgott (master) $ cap deploy
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
* 02:02:43 == Currently executing `deploy'
* 02:02:43 == Currently executing `deploy:update'
** transaction: start
~/Projects/my/forgott (master) $ irb
1.9.3p125 :001 > puts `rvm current`
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
ruby-1.9.3-p125
=> nil
1.9.3p125 :002 >
NoMethodError (undefined method `in_use?' for nil:NilClass):
gems/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:201:in `clear_stale_cached_connections!'
org/jruby/RubyArray.java:1615:in `each'
gems/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:199:in `clear_stale_cached_connections!'
gems/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:250:in `checkout'
org/jruby/RubyKernel.java:1410:in `loop'
gems/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:230:in `checkout'
file:/lib/gems-gems-jruby-jars-1.6.7-lib-jruby-stdlib-1.6.7.jar!/META-INF/jruby.home/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
file:/lib/gems-gems-jruby-jars-1.6.7-lib-jruby-stdlib-1.6.7.jar!/META-INF/jruby.home/lib/ruby/1.8/monitor.rb:190:in `mon_synchronize'
gems/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:229
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
$ brew --version
0.8.1
$ brew doctor
Warning: Your Xcode is configured with an invalid path.
You should change it to the correct path. Please note that there is no correct
path at this time if you have *only* installed the Command Line Tools for Xcode.
If your Xcode is pre-4.3 or you installed the whole of Xcode 4.3 then one of
these is (probably) what you want:
...
if Rails.env.a_fortune_one_company?
# required for threadsafe!. it have different behaviors when added here and when it's added to the env file
config.eager_load_paths += Dir["#{config.root}/app/**/"]
config.eager_load_paths += Dir["#{config.root}/lib/**/"]
end
...

3.2.1

Finished in 458.5 seconds
2520 examples, 0 failures, 15 pending

real	7m52.486s
user	7m36.946s
sys	0m9.871s