Skip to content

Instantly share code, notes, and snippets.

# https://github.com/mpapis/rvm-with
require "rvm/with"
Bundler.with_clean_env do
RVM.with "in ." do |r|
puts r.execute "bundle install"
puts r.execute "rake db:create db:migrate db:setup"
end
end
# rails repo location
https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb
# relative app path
lib/templates/rails/scaffold_controller/controller.rb
# after opening a new terminal on a fresh boot
/home/nick/.rvm/scripts/base:source:97: no such file or directory: /home/nick/.rvm/initialize
/home/nick/.rvm/scripts/base:source:106: no such file or directory: /home/nick/.rvm/selector
/home/nick/.rvm/scripts/base:source:107: no such file or directory: /home/nick/.rvm/selector_gemsets
/home/nick/.rvm/scripts/base:source:108: no such file or directory: /home/nick/.rvm/selector_late
/home/nick/.rvm/scripts/base:source:109: no such file or directory: /home/nick/.rvm/selector_parse
/home/nick/.rvm/scripts/base:source:118: no such file or directory: /home/nick/.rvm/functions/logging
/home/nick/.rvm/scripts/base:source:118: no such file or directory: /home/nick/.rvm/functions/db
/home/nick/.rvm/scripts/base:source:118: no such file or directory: /home/nick/.rvm/functions/support
<%
title @article.title
%>
<% cache @article do %>
<%= render "article_details", article: @article %>
<%= markdown(@article.article_markdown) %>
<% end %>
# Account.where(id: 3).entries.first
SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = 3
# Account.find(3)
SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 3]]
group :development do
gem "guard", ">= 2.1.0"
gem "guard-livereload"
gem "rack-livereload"
end
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 7.5G 6.7G 469M 94% /
udev 368M 4.0K 368M 1% /dev
tmpfs 150M 784K 149M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 375M 260K 374M 1% /run/shm
# Common assets to include in the path.
config.assets.precompile << Proc.new { |path|
if path =~ /\.(eot|svg|ttf|woff|png)\z/
true
end
}
# Trigger ~/.bashrc commands
. ~/.bashrc
@AntelopeSalad
AntelopeSalad / console
Last active January 1, 2016 18:29
rvm reinstall with --debug
$ rvm reinstall ruby-2.1.0 --debug
ruby-2.1.0 - reinstall
ruby-2.1.0 - #already removed src
Log prefix: /home/nick/.rvm/log/1388426228_ruby-2.1.0/
Log filesystem: ext4
Log max name length: 250
Log file: /home/nick/.rvm/log/1388426228_ruby-2.1.0/remove.rubies.log
[2013-12-30 12:57:08] __rvm_rm_rf
__rvm_rm_rf ()
{