Lokkaインストール。bundle installではまった。
移転しました。
RubyとGitのお勉強をしようと、HerokuにLokkaをインストール。
Lokka - CMS for Cloud
出来上がりイメージ
こんな感じ
ひみつきち
Lokkaでブログ始めました
gemsetの設定
mkdir lokka cd lokka
rvm gemset create lokka-heroku 'lokka-heroku' gemset created (/Users/meganii/.rvm/gems/ruby-1.9.2-p290@lokka-heroku). rvm gemset use lokka-heroku
Lokkaのインストール
git clone git://github.com/komagata/lokka.git get install heroku heroku create himitsukichi Creating himitsukichi... done, stack is bamboo-mri-1.9.2 http://himitsukichi.heroku.com/ | git@heroku.com:himitsukichi.git Git remote heroku added
git push heroku master heroku rake db:setup
ここで問題が....
ローカル環境でも動かしたいと思って、以下のコマンドを打ち込んでみるとエラーになった。
bundle install --path vendor/bundle --without production Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/meganii/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/meganii/.rvm/rubies/ruby-1.9.2-p290/bin/ruby --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib Gem files will remain installed in /Users/meganii/Dropbox/Sites/lokka/vendor/bundle/ruby/1.9.1/bundler/gems/do-d7cb262d89a1/do_mysql for inspection. Results logged to /Users/meganii/Dropbox/Sites/lokka/vendor/bundle/ruby/1.9.1/bundler/gems/do-d7cb262d89a1/do_mysql/ext/do_mysql/gem_make.out An error occured while installing do_mysql (0.10.6), and Bundler cannot continue. Make sure that `gem install do_mysql -v '0.10.6'` succeeds before bundling.
なんかmysqlのインストールがうまくいってないみたい。
単体で試してみてもダメ
gem install do_mysql -v '0.10.6'
brewもサーバが落ちてる><
brew install mysql
mysqlを使わないことで、問題を回避
mysqlを使わないようにすれば、問題を回避できました。根本的な解決にはなってないけど、ひとまず動かせる環境はできました!!
bundle install --path vendor/bundle --without development mysql postgresql
cp database.default.yml database.yml bundle exec rake db:setup bundle exec rackup
参考
HerokuでWebアプリ開発を始めるなら知っておきたいこと (7)ブログならLokka - アインシュタインの電話番号☎
HerokuでLokka
do_mysqlのインストールでエラー - マロハシノニッキ
同じようなエラー
LokkaをインストールしてHerokuにデプロイした - kk_Atakaの日記
gem管理の新標準ツール"Bundler"のTips - 床のトルストイ、ゲイとするとのこと
rvmのgemsetを使ってbundlerと賢く付き合う方法 - Hello, world! - s21g
HerokuでWebアプリ開発を始めるなら知っておきたいこと (7)ブログならLokka - アインシュタインの電話番号☎