ALB Windows版のために必要な変更メモ
Post date: 2014/04/11 9:17:26
1. htreeとiconv gemを外す
reports_controller.rbで、require 'htree'をやめる
2. mysql2をやめてsqliteに戻す; config/database.ymlを変更
3. app/controllers, helpers, modelsをalbからalb2にコピー
4.lib/versioning.rb で、最初の部分を以下のようにかえる:
if RUBY_VERSION < "1.9"
require 'parsedate'
else
5.app/models/guest.rbで、最初の部分を以下のようにかえる
if RUBY_VERSION < "1.9"
class Guest < Hobo::Guest
6.public/simulationで、git initする
7. alb2/db/migrate をコピーし、以下を実行して、データベースを作る
RAILS_ENV=production MAIL_NOT_WORKING=yes bundle exec rake db:migrate
8. app/mailers をコピー
9. config/environments/production.rbで、以下に変更
config.serve_static_assets = true
10. config/database.yml で、productionにsqliteを使うよう変更
bundle exec rails s -e production で実行
注意: signupに失敗したときは、RAILS_ENV=production rails console で
User.find(1).destroyする
alb.cのコンパイル
ruby が作成したMakefileで以下の変更が必要
1。topdirとhdrdirにつき
/c/Ruby193 ... => c:/Ruby193
これで、ruby.hが見つからないというエラーはなくなる
2。ARCH_FLAG = -march=i486 => ARCH_FLAG = -m32
これで、CPU you selected does not support X86-64 instruction setというエラーはなくなる