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
bash 'install rvm' do | |
creates node.rvm[:bin] | |
cwd '/tmp' | |
user 'root' | |
code <<-EOH | |
tar zxf #{node.rvm[:rvm]}.tar.gz | |
su - #{user} -c "cd /tmp/#{node.rvm[:rvm]}; sudo ./install" | |
cp /tmp/#{node.rvm[:rvm]}/archives/* #{node.rvm[:dir]}/archives/ | |
chown root:rvm #{node.rvm[:dir]}/archives/* | |
su - #{user} -c "source /usr/local/rvm/scripts/rvm && rvm install 1.9.3-p0" |
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
remote_file "/tmp/#{node.rvm[:rvm]}.tar.gz" do | |
source "#{node.rvm[:rvm]}.tar.gz" | |
action :create_if_missing | |
end | |
group 'rvm' do | |
members [node.rvm[:user]] | |
end | |
bash 'install rvm' do |
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
$ rvm 1.9.3-p0 | |
$ gem install path/to/gem/linecache19 -v "0.5.13" | |
$ gem install path/to/gem/ruby-debug-base19 -v "0.11.26" -- --with-ruby-include="${rvm_path}/src/`rvm tools strings`" |
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
server { | |
server_name example.com; | |
if ($http_X_forwarded_proto = http) { | |
rewrite ^(.*) https://$server_name$1 permanent; | |
} | |
} |
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
ruby_block "Remove from config, if in config file" do | |
block do | |
cfg_cmd = "/opt/rightscale/lb/bin/haproxy_config_server.rb" | |
args = "-a del -w" | |
args += " -l \"#{node.lb_urtak[:applistener_name]}\"" | |
args += " -s \"#{node.remote_recipe[:backend_id]}\"" | |
args += " -t \"#{node.remote_recipe[:backend_ip]}:8000\"" | |
Chef::Log.info("running command: #{cfg_cmd} #{args}") |
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
# -*- encoding : utf-8 -*- | |
# Because Capybara.app gets run by Thin in a separate thread, errors raised in | |
# the application during request_specs get hidden and just show up in the | |
# selenium-controller browser as 500 errors with no extra info. This module | |
# helps us dig into those errors. | |
module RequestSpecs | |
module ExceptionHelper | |
@@last_exception = nil |
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
$ gem install rb-fsevent -v '0.9.0.pre1' | |
Building native extensions. This could take a while... | |
ERROR: Error installing rb-fsevent: | |
ERROR: Failed to build gem native extension. | |
"/Users/aarongibralter/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby" -rubygems /Users/aarongibralter/.rvm/gems/ruby-1.9.3-rc1@global/gems/rake-0.9.2/bin/rake RUBYARCHDIR=/Users/aarongibralter/.rvm/gems/ruby-1.9.3-rc1@foo/gems/rb-fsevent-0.9.0.pre1/lib RUBYLIBDIR=/Users/aarongibralter/.rvm/gems/ruby-1.9.3-rc1@foo/gems/rb-fsevent-0.9.0.pre1/lib | |
Build settings from configuration file '/Users/aarongibralter/.rvm/gems/ruby-1.9.3-rc1@foo/gems/rb-fsevent-0.9.0.pre1/ext/rb-fsevent.xcconfig': | |
ARCHS = $(NATIVE_ARCH_ACTUAL) | |
DSTROOT = ../../ | |
GCC_VERSION = com.apple.compilers.llvm.clang.1_0 |
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
............. | |
Finished in 9.15 seconds | |
13 examples, 0 failures | |
GC 338 invokes. | |
Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC Time(ms) | |
1 0.251 1719160 2260992 56442 4.46699999999999874944 | |
2 0.272 1882160 2277376 56851 3.33300000000003038281 | |
3 0.324 2395800 4014080 100205 6.31100000000001060130 | |
4 0.368 2633240 4063232 101432 5.80100000000000015632 |
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
$ time rails r "puts 'foo'" | |
foo | |
real 0m22.491s | |
user 0m20.641s | |
sys 0m1.854s | |
$ time rspec spec/controllers/admin/users_controller_spec.rb | |
No DRb server is running. Running in local process instead ... | |
............. |
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
--colour | |
--drb |