Qiita - A technical knowledge sharing platform for programmers. Search through stocked items Qiita - A technical knowledge sharing platform for programmers. Sign Up Log In▾ Login with GitHub Login with Twitter
Qiita - A technical knowledge sharing platform for programmers. Search through stocked items Qiita - A technical knowledge sharing platform for programmers. Sign Up Log In▾ Login with GitHub Login with Twitter
You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers, you can switch to '.ruby-version' using 'rvm rvmrc to [.]ruby-version' or ignore this warnings with 'rvm rvmrc warning ignore /path/to/rails/.rvmrc', '.rvmrc' will continue to...
Qiita - A technical knowledge sharing platform for programmers. Search through stocked items Qiita - A technical knowledge sharing platform for programmers. Sign Up Log In▾ Login with GitHub Login with Twitter
Qiita - A technical knowledge sharing platform for programmers. Search through stocked items Qiita - A technical knowledge sharing platform for programmers. Sign Up Log In▾ Login with GitHub Login with Twitter
Qiita - A technical knowledge sharing platform for programmers. Search through stocked items Qiita - A technical knowledge sharing platform for programmers. Sign Up Log In▾ Login with GitHub Login with Twitter
upstream backend-unicorn { server 127.0.0.1:3000; } server { listen 61***; # Gehirn のプロキシ先ポート番号 server_name yourname.gehirn.ne.jp; # ドキュメントルートは Rails アプリの public ディレクトリを指定しておく root /home/<ユーザ名>/public_html/rails_app/public; location / { proxy_pass_header Server; proxy_set_header Host ...
Join Qiita and make the sharing of programming knowledge more efficient! Stock Posts Let's stock interesting posts so that you can review them later at any time! Follow Tags You can subscribe to a feed of latest posts relating to your favorite language by following tags! Follow Users ...
$CONFIGURE_OPTS="--with-openssl-dir=/opt/local --with-readline-dir=/opt/local --with-iconv-dir=/opt/local" rbenv install 1.8.7-p370 ERROR: This package must be compiled with GCC, but ruby-build couldn't find a suitable `gcc` executable on your system. Please install GCC and try again....
Join Qiita and make the sharing of programming knowledge more efficient! Stock Posts Let's stock interesting posts so that you can review them later at any time! Follow Tags You can subscribe to a feed of latest posts relating to your favorite language by following tags! Follow Users ...
http://qiita.com/teams/frogapps
特徴的なgem: Parallel(並列処理), Resque(遅延実行) サーバー:Nginx,unicorn (+capistrano) 認証:devise, omniauth DB: MySQL, redis assets: coffeescript,scss,less,haml (twitter bootstrapを利用)
upstart + god + rails + daemons-railsでworkerを生かし続ける
%w[password password_confirmation encrypted_password]
gem build animate-rails.gemspec WARNING: description and summary are identical Successfully built RubyGem Name: animate-rails Version: 0.0.1 File: animate-rails-0.0.1.gem
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)" ---------- ==> This script will install: /usr/local/bin/brew /usr/local/Library/... /usr/local/share/man/man1/brew.1 Press ENTER to continue or any other key to abort ★ENTER ==> /usr/bin/sudo /bin/mkdir /usr/local WARNING: Impro...
例えば http://hoge.com/data.xml というXMLを返すAPIがあったとして、ここからJSONデータに変換したいなら以下のコード。 ただしActiveSupportが必要なので、Rails以外の環境では、ActiveSupportを別途インストールすること。 require 'active_support/core_ext' require 'open-uri' hash = Hash.from_xml open('http://hoge.com/ext/data.xml').read json = hash.to_json ActiveSup...
# 一度目のfetchなのでmissする Rails.cache.fetch('key'){'value'}.should_not be_from_cache # 二度目なのでhitする Rails.cache.fetch('key'){'value'}.should be_from_cache # deleteした後はmissする Rails.cache.delete('key') Rails.cache.fetch('key'){'value'}.should_not be_from_cache
http://shijimiii.info/technical-memo/semver/
$ brew install rbenv $ brew install ruby-build $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshenv $ echo 'eval "$(rbenv init -)"' >> ~/.zshenv
VCR . configure do | c | c . cassette_library_dir = 'test/vcr_cassettes' c . allow_http_connections_when_no_cassette = true #VCRブロック外のHTTP通信は許可する c . hook_into :webmock # or :fakeweb end
Basic usage: mina help # Show help. mina init # Creates a sample config file. mina tasks # Show all tasks. Server tasks: mina console # Starts an interactive console. mina deploy # Deploys the current version to the server. mina rails[arguments] # Execute a Rails command in the curren...
function rezeus() { \rm .zeus.sock || true ps -ef | grep zeus | awk ' { print $2 } ' | xargs kill || true bundle exec zeus start }
after_commit内ではchangesが空になってるので注意 FactoryGirlでpaperclip用のダミー画像を登録する方法
# CIサーバー等 bundle package --all ## capistranoのcopy方式等で本番機側にアプリケーションをデプロイする。 ## capistranoのレシピ上で、以下の形でbundlerを実行させるようにする。 bundle install --deployment
みたいなカウント保持するカラムはunsigned intで定義するのが普通な気がするのですが、ActiveRecord::Migrationではunsignedをサポートしていません。 かるく調べた限りだと、unsignedをサポートしてるのってMySQLぐらいらしく、PostgreSQLはサポートしてないしSQLite3はスキーマ定義のときにunsignedって書いてもエラーにならないけど完全に無視されてて余裕でマイナスの値を保持できてしまう。 そういう背景があってunsignedを扱いたいという要件はActiveRecordやRailsにおいてはエッジケースだ...
" SuperTab like snippets behavior. imap < expr>< TAB> neocomplcache#sources#snippets_complete#expandable() ? "\<Plug>(neocomplcache_snippets_expand)" : pumvisible() ? "\<C-n>" : "\<TAB>"