2011-10-01から1ヶ月間の記事一覧
railsでMySQLをActiveRecordを通して使うとtinyintが勝手にboolean型になって困った。 元々がRailsを意識していないdatabaseだったです。 カラム名_code_before_type_cast としたらtinyint型のを数字として扱えました。 ActiveRecord::ConnectionAdapters::M…
ActiveRecord::StatementInvalid (PGError: ERROR: syntax error at or near "high_price" 2011-10-30T09:02:04+00:00 app[web.1]: LINE 1: SELECT MAX(high_price) high_price,created_on FROM "exchange... Error: SELECT MAX(high_price) high_price,crea…
$ git checkout-index -a -f --prefix=export/
sudo heroku db:push Taps Load Error: no such file to load -- taps/operation You may need to install or update the taps gem to use db commands. On most systems this will be: sudo gem install taps checking for sqlite3.h... no sqlite3.h is mi…
Partner.unscoped{ Partner.all } meta_searchの場合でも Partner.unscoped{ Partner.search(params[:search]) } pagerを利用したい時とか Partner.unscoped{ @search.page(params[:page]).per(params[:per]) }
herokuにプロジェクト作成 sudo heroku create appname herokuにプッシュ git push git@heroku.com:xxxx-rain-4919.git master herokuでmigrate sudo heroku rake db:migrate herokuでログを見る heroku config:add LOG_LEVEL=DEBUG sudo heroku logs --tail…