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
Sample code: Append Operator(<<) | |
class Inbox | |
attr_reader :unread_count | |
def initialize | |
@messages = [] | |
@unread_count = 0 | |
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
Problem: | |
Starting MySQL | |
- ERROR! The server quit without updating PID file (/usr/local/var/mysql/User.local.pid). | |
***mysqld tries to find its tables in /usr/local/var/mysql | |
Solution: | |
***change directories accordingly*** |
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
<%= form_for :user, :url => password_path do |f| %> | |
<p><%= f.label :current_password, "Current password" %><br /> | |
<%= f.password_field :current_password %></p> | |
<p><%= f.label :password, "New password" %><br /> | |
<%= f.password_field :password %></p> | |
<p><%= f.label :password_confirmation, "Confirm new password" %><br /> | |
<%= f.password_field :password_confirmation %></p> |
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
after "deploy:symlink", "deploy:restart_workers" | |
after "deploy:restart_workers", "deploy:restart_scheduler" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') |