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
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": "eslint:recommended", | |
"parserOptions": { | |
"ecmaFeatures": { | |
"experimentalObjectRestSpread": true, |
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
def odd_or_even_mod(number) | |
return "Even" if number % 2 == 0 | |
return "Odd" | |
end | |
def odd_or_even_bit(number) | |
return "Even" if number & 1 == 0 | |
return "Odd" | |
end | |
require 'benchmark' |
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
$ bundle install | |
Fetching source index for http://rubygems.org/ | |
You have requested: | |
rack = 1.3.0 | |
The bundle currently has rack locked at 1.2.3. | |
Try running `bundle update rack` | |
$ bundle update rack | |
Fetching source index for http://rubygems.org/ |
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 'http://rubygems.org' | |
gem 'rails', '3.0.9' | |
# rake 0.9.0 is broken (should work with rails 3.0.8) | |
gem 'rake', '~> 0.8.7' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3-ruby', :require => 'sqlite3' |
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 './rvm' | |
LoadError: no such file to load -- rvm/errors | |
from /var/www/fat/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require' | |
from /var/www/fat/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require' | |
from /var/www/fat/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency' | |
from /var/www/fat/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require' | |
from /usr/local/rvm/lib/rvm.rb:59:in `<module:RVM>' | |
from /usr/local/rvm/lib/rvm.rb:56:in `<top (required)>' | |
from /var/www/fat/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require' | |
from /var/www/fat/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require' |
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 info | |
ruby-1.9.2-p136@fat: | |
system: | |
uname: "Linux ip-10-171-45-26 2.6.31-302-ec2 #7-Ubuntu SMP Tue Oct 13 19:06:04 UTC 2009 i686 GNU/Linux" | |
bash: "/bin/bash => GNU bash, version 4.0.33(1)-release (i486-pc-linux-gnu)" | |
zsh: " => not installed" | |
rvm: |
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-1.9.2-p136 :005 > rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME'])) | |
=> "/usr/local//rvm" | |
ruby-1.9.2-p136 :006 > rvm_lib_path = File.join(rvm_path, 'lib') | |
=> "/usr/local//rvm/lib" | |
ruby-1.9.2-p136 :007 > $LOAD_PATH.unshift rvm_lib_path | |
=> ["/usr/local//rvm/lib", "/var/www/fat/releases/20110701220916/lib", "/var/www/fat/releases/20110701220916/vendor", "/var/www/fat/releases/20110701220916/lib/", "/var/www/fat/releases/20110701220916/lib/tasks/", "/var/www/fat/releases/20110701220916/lib/nike_plus/", "/var/www/fat/releases/20110701220916/lib/jobs/", "/var/www/fat/releases/20110701220916/app/models/observations", "/var/www/fat/releases/20110701220916/app/models/observations/", "/var/www/fat/releases/20110701220916/app/models/authentications", "/var/www/fat/releases/20110701220916/app/models/authentications/", "/var/www/fat/releases/20110701220916/app/helpers", "/var/www/fat/releases/20110701220916/app/controllers", "/var/www/fat/releases/20110701220916/app/models", "/var/www/fat/shared/bund |
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-1.9.2-p136 :015 > rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME'])) | |
=> "/usr/local//rvm" | |
ruby-1.9.2-p136 :016 > rvm_lib_path = File.join(rvm_path, 'lib') | |
=> "/usr/local//rvm/lib" | |
ruby-1.9.2-p136 :017 > $LOAD_PATH.unshift rvm_lib_path | |
=> ["/usr/local//rvm/lib", "/usr/local//rvm/lib", "/var/www/fat/releases/20110701061923/lib", "/var/www/fat/releases/20110701061923/vendor", "/var/www/fat/releases/20110701061923/lib/", "/var/www/fat/releases/20110701061923/lib/tasks/", "/var/www/fat/releases/20110701061923/lib/nike_plus/", "/var/www/fat/releases/20110701061923/lib/jobs/", "/var/www/fat/releases/20110701061923/app/models/observations", "/var/www/fat/releases/20110701061923/app/models/observations/", "/var/www/fat/releases/20110701061923/app/models/authentications", "/var/www/fat/releases/20110701061923/app/models/authentications/", "/var/www/fat/releases/20110701061923/app/helpers", "/var/www/fat/releases/20110701061923/app/controllers", "/var/www/fat/releases/20110701061923/app/models", "/ |
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
Error message: | |
uninitialized constant RVM::Environment | |
Exception class: | |
NameError | |
Application root: | |
/var/www/fat/current | |
Backtrace: | |
# File Line Location | |
0 /usr/local/rvm/lib/rvm/environment.rb 6 in `' | |
1 /usr/local/rvm/lib/rvm/environment.rb 3 in `' |
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
if [[ -s "/usr/local/rvm/environments/ruby-1.9.2-p136@fat" ]] ; then | |
. "/usr/local/rvm/environments/ruby-1.9.2-p136@fat" | |
else | |
rvm --create use "ruby-1.9.2-p136@fat" | |
fi |
NewerOlder