2013-03-24から1日間の記事一覧

ActionMailerクラスでヘルパーメソッドを使いたいとき

http://d.hatena.ne.jp/apo-co/20090928/p1include ApplicationHelper helper :applicationの宣言を追加する。 http://stackoverflow.com/questions/4937208/access-helpers-from-mailer http://stackoverflow.com/questions/1416978/how-to-use-my-view-hel…

ヘルパーメソッドの使いどき

http://tobysoft.net/wiki/index.php?Ruby%2FRuby%20on%20Rails%2F%A5%B3%A5%F3%A5%C8%A5%ED%A1%BC%A5%E9%A1%BC%A4%CE%A5%E1%A5%BD%A5%C3%A5%C9%A4%F2%A5%D3%A5%E5%A1%BC%A4%AB%A4%E9%B8%C6%A4%D3%BD%D0%A4%B9%CA%FD%CB%A1今わかったけど コントローラのメソ…

Rails3でメール送信

http://blog.scimpr.com/2012/09/15/railsでメール送信をテスト〜actionmailer/ $ rails new mailtest $ rails g scaffold user name email $ rails g mailer my_mailer helloconfig/environments/develompent.rb 以下はGmailを使う時の設定(メールアドレス…

bitbucketに公開鍵を登録してもPermission denied (publickey). fatal: The remote end hung up unexpectedlyと言われ続けるとき

Permission denied (publickey). fatal: The remote end hung up unexpectedlyssh-addというのが必要らしい。 $ ssh-add ~/.ssh/id_rsa.bitbucket.orgしてみると、 Could not open a connection to your authentication agent.というエラーが出た。調べてみ…

New relicの設定

強制的にエージェントをスタートする方法 https://newrelic.com/docs/ruby/forcing-the-ruby-agent-to-startconfig/newrelic.yml - :agent_enabled => auto + :agent_enabled => trueまだうまくいかない。