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
my PS1: | |
PS1="\w $(~/.rvm/bin/rvm-prompt)\n" | |
here, first i open a new terminal, then i source ~/.bash_profile and then seems to work: | |
Last login: Fri Apr 23 10:35:56 on ttys001 | |
+ rvm_gemset_separator=+ | |
++ command -v ruby |
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
config.generators do |g| | |
g.template_engine :haml | |
g.test_framework :rspec, :fixture => true, :views => false | |
g.fixture_replacement :factory_girl, :dir => "spec/factories" | |
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
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. | |
# It is recommended to regenerate this file in the future when you upgrade to a | |
# newer version of cucumber-rails. Consider adding your own code to a new file | |
# instead of editing this one. Cucumber will automatically load all features/**/*.rb | |
# files. | |
ENV["RAILS_ENV"] ||= "cucumber" | |
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support |
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
h = {true => 0, false => 0} | |
[false, true, true, true, true, false].each do |x| | |
h.merge!({x => h[x] + 1}) | |
end | |
if h[true] > h[false] | |
puts 'true' | |
elsif h[true] < h[false] | |
puts 'false' | |
else | |
puts 'same' |
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 'rubygems' | |
require 'ap' | |
IRB::Irb.class_eval do | |
def output_value | |
ap @context.last_value | |
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
class ProductArray | |
#@array = Array Product.all.map {|product| product.id} | |
# hi = "aaaa" | |
def hi | |
"aaaa" | |
end | |
end | |
p= ProductArray.new | |
var = p.hi |
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.8.7-p248 ~ | |
which babushka | |
/usr/local/bin/babushka | |
ruby-1.8.7-p248 ~ | |
babushka version | |
0.5.0 | |
ruby-1.8.7-p248 ~ | |
rvm 1.9.2-head | |
ruby-1.9.2-head ~ | |
babushka version |
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
svn checkout http://wkhtmltopdf.googlecode.com/svn/trunk/ wkhtmltopdf | |
cd wkhtmltopdf | |
cmake -D CMAKE_INSTALL_PREFIX=/usr . | |
make | |
sudo make install | |
wkhtmltopdf www.google.com google.pdf | |
open google.pdf |
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
1.9.2-head@rails3 ~/railsapps/rails-test-app master | |
cucumber features/logging_in.feature | |
Using the default profile... | |
Feature: Logging in | |
In order to log in | |
As a user | |
I want pretty things | |
Background: # features/logging_in.feature:6 | |
Given a user: # features/step_definitions/seed_steps.rb:1 |
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
1.9.2-head@rails3 ~/railsapps/rails-test-app sans_authlogic | |
cucumber features/logging_in.feature | |
Using the default profile... | |
...F---- | |
(::) failed steps (::) | |
no link with title, id or text 'Login' found (Capybara::ElementNotFound) | |
./features/step_definitions/web_steps.rb:34:in `block (2 levels) in <top (required)>' | |
./features/step_definitions/web_steps.rb:13:in `with_scope' |