三鷹でRubyはじめました。

三鷹でRubyはじめました。

三鷹でRubyとRuby on Railsで開発を始めたPHPプログラマー「高橋」の開発日誌です。開発する上で感じたことなど、いろいろ書いていこうと思っています。

Amebaでブログを始めよう!

pg_configのPathを通しても、gem install pg が失敗する



# gem install pg
Building native extensions. This could take a while...
.......
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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=/usr/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config


# gem install pg
Building native extensions. This could take a while...
.......
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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=/usr/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/pg-0.14.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/pg-0.14.1/ext/gem_make.out


解決方法


yum install postgresql-devel
「Adwords Editor」
GoogleAdwordsの管理をオフラインで行うためのツール。

通常、オンラインで行うものをオフラインで行い、完了後、情報をアップロードする。

ダウンロード先:http://www.google.com/intl/ja/adwordseditor/

オンラインの画面が、Macの旧型で表示されないという不具合があり
旧型マックでAdwordsの管理を行うには、どうしたら良いかを考えていたら
こういうツールがあることを知った。

また、ノートPCを持ち歩き、ワイマックスなどを使う自分としては
ネット環境が安定しないので、オンラインではなくオフラインでの情報を管理できるのは、とてもありがたい。

追って、レビューを書いていこうと思う。
ログイン画面をRailsで作っていたのですが、フィールドの名前を間違えたので
直接SQLで変更して良いのか不安なので、探してみた。

DBの状態を以前のバージョンに戻すRakeタスク

db:rollback

DBの状態を以前のバージョンに戻すタスク。

ちなみに、schema_migrationsテーブルで、マイグレーションの管理をしているようだ。

☆マイグレーション関連のRakeタスクの再確認