Skip to content

Instantly share code, notes, and snippets.

@shu0115
shu0115 / application.rb
Created December 4, 2013 05:13
Rails 4.0.2 [deprecated] I18n.enforce_available_locales〜 ref: http://qiita.com/shu_0115/items/1cf6220758a9c64c7adf
I18n.enforce_available_locales = true
@shu0115
shu0115 / file0.txt
Created December 4, 2013 03:07
Heroku複数アカウント設定 - heroku-accounts ref: http://qiita.com/shu_0115/items/736c34c96302592960a1
heroku plugins:install git://github.com/ddollar/heroku-accounts.git
----------
Installing heroku-accounts... done
----------
@shu0115
shu0115 / file0.txt
Created December 4, 2013 03:15
Markdown/シンタックスハイライト導入 - redcarpet/coderay ref: http://qiita.com/shu_0115/items/476a51cb4751515f3ac2
# Markdown & Syntax Highlight
gem 'redcarpet'
gem 'coderay'
@shu0115
shu0115 / Gemfile
Created November 30, 2013 18:29 — forked from pcreux/Gemfile
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@shu0115
shu0115 / jquery.upload-1.0.2.js
Created September 30, 2013 04:52
jQuery.uploadで「Uncaught SyntaxError: Unexpected token <」というエラーが出たら ref: http://qiita.com/shu_0115/items/c5bf6d5741bb62687583
switch (type) {
case 'xml':
data = parseXml(data);
break;
case 'json':
// 自動挿入タグ除去
data = data.replace(/<pre style="word-wrap: break-word; white-space: pre-wrap;">/g, '')
data = data.replace(/<pre>/g, '')
data = data.replace(/<\/pre>/g, '')
cd ~/labo
bundle gem webpay-scaffold
----------
create webpay-scaffold/Gemfile
create webpay-scaffold/Rakefile
create webpay-scaffold/LICENSE.txt
create webpay-scaffold/README.md
create webpay-scaffold/.gitignore
create webpay-scaffold/webpay-scaffold.gemspec
create webpay-scaffold/lib/webpay/scaffold.rb
@shu0115
shu0115 / file0.txt
Created July 13, 2013 11:09
Ruby 2.0.0-p247 + Rails 4.0.0 + minimum-omniauth-scaffold ref: http://qiita.com/shu_0115/items/6f5f0c210e9999da66be
belem
brew install rbenv-default-gems
----------
==> Installing rbenv-default-gems dependency: ruby-build
==> Downloading https://github.com/sstephenson/ruby-build/archive/v20130501.tar.gz
######################################################################## 100.0%
==> ./install.sh
/usr/local/Cellar/ruby-build/20130501: 75 files, 336K, built in 2 seconds
==> Installing rbenv-default-gems
==> Downloading https://github.com/sstephenson/rbenv-default-gems/archive/v1.0.0.tar.gz
######################################################################## 100.0%
/Users/shu/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/middleware/stack.rb:43:in `build': undefined method `new' for ExceptionNotifier:Module (NoMethodError)
from /Users/shu/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/middleware/stack.rb:118:in `block in build'
from /Users/shu/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/middleware/stack.rb:118:in `each'
from /Users/shu/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/middleware/stack.rb:118:in `inject'
from /Users/shu/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/middleware/stack.rb:118:in `build'
from /Users/shu/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:495:in `app'
from /Users/shu/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0.rc2/l
@shu0115
shu0115 / file0.txt
Created May 16, 2013 06:58
Rails4.0.0.rc1 exception_notificationエラー ref: http://qiita.com/items/2039bcac71a9b11825b1
rails s
----------
/Users/shu/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/class/attribute_accessors.rb:40:in `block in cattr_reader': invalid class attribute name: true (NameError)
----------