SQLiteの準備 -> 断念 -> mysqlへ
macにはsqlite3が標準装備されているが、
railsで使う場合には、SWIGというスクリプト言語とC言語を繋げる系ツールも同時に必要。
SWIGを入れた上で、rubyからsqliteを使う為のライブラリsqlite3-rubyを入れる。
sqlite3-ruby
rubyからsqlite3を使う為に必要。
sudo gem install --remote sqlite3-ruby
sqlite3-rubyはSWIGをインストールした後でインストールする必要があるとの事。
参考文献として
http://www.machu.jp/diary/20070117.html
http://techno.hippy.jp/rorwiki/?HowtoUseSQLite
さらに参考文献として
sqlite3-ruby1.2.1 のREADME
== Compilation and Installation
Simply do the following, after installing SQLite3:
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb installAlternatively, you can download and install the RubyGem package for
SQLite3/Ruby (you must have RubyGems and SQLite3 installed, first):gem install sqlite3-ruby
If you have sqlite3 installed in a non-standard location, you can specify the location of the include and lib files by doing:
gem install sqlite3-ruby -- --with-sqlite3-include=/opt/local/include \
--with-sqlite3-lib=/opt/local/libAlso, the gem ships with the C source-code pre-built, so (as of version 1.1.1)
you no longer need to have SWIG installed. However, if you have SWIG installed
and you want to generate the C file yourself, you can specify the
--with-swig
option.