Rails On MacOsX

Ruby On Rails On MacOs X


== Jun'2014 - restarting for fresh experiments ==

Installing MacOs X Command Line Tools - hrm I'm still running Snow Leopard, so using an old package of it.

Actually, which flavor/stack do I want?


Apr'2011 - Pow from Thirty7 Signals makes it easy to run Rack-based apps on a Mac.


Jul18'2010

  • following install instrux from Agile Web Dev with Rails (v3)

  • install MacPorts

  • install SQLite-3

  • sudo gem update --system - good

  • sudo gem install rails - good

  • sudo gem update rake - good

  • sudo gem install sqlite-ruby

    • fail!

    • realize I don't have X Code installed

    • install X Code 3.1.4 - latest version for MacOs X Leopard (10.5.x)

    • try again - still fail {{{

ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb checking for #include <sqlite3.h> ... yes checking for sqlite3_libversion_number() in -lsqlite3... yes checking for rb_proc_arity()... no checking for sqlite3_initialize()... no sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade! *** 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. }}}

  • argh this kinda thing makes me nuts

  • installed Home-Brew via the "Quick Install" script.

  • tried {{{ brew install sqlite3 Warning: It appears you have Macports or Fink installed Although, unlikely, this can break builds or cause obscure runtime issues. If you experience problems try uninstalling these tools. Error: No available formula for sqlite3 }}}

  • ok, just doing brew install sqlite seems to have worked

  • but sudo gem install sqlite-ruby fail again, differently

  • running sqlite3 tells me I'm running 3.4.0

  • repeat the whole process from the top, after SQLite....

  • get same error when hit sqlite-ruby as other post-homebrew time: {{{

ERROR: Error installing sqlite-ruby: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb checking for main() in -lsqlite... no checking for sqlite.h... 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. }}}

  • duh, maybe I should go find mkmf.log!

  • tried find /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1 -name mkmf.log but got nothing!

Jul19'2010

  • Decide that it probably makes more sense for me to use MySQL instead of SQLite.

  • install 32-bit MySQL. Seems fine.

  • do sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config - seems fine other than bunch of msgs in the make-documentation stage like No definition for next_result

  • create demo app per book, launch. Get proper page at http://localhost:3000/ (of course this isn't talking to MySQL).

  • realize I have Mongrel installed somewhere, so it launched with that. To follow book model of using W E Brick, have to launch with ruby script/server webrick

Jul20'2010

  • try to move forward in tutorial - discover don't seem to have mysqladmin anywhere.

Jul21'2010

Aug03'2010 - play with Django/Pinax a bit, since it was working with SQLite.

Aug05'2010


Edited:    |       |    Search Twitter for discussion