Windows 7 64bit (Home Premium)
Ruby 1.9.2 p290 (2011-07-09) [i386-mingw32]
The task at hand: Teaching myself web-based database stuff through the Ruby on Rails Framework - I have no prior experience with this...
The problem: Ruby, despite my having successfully installed the mysql2 rubygem thinks that the gem is missing when I invoke a rails command that requires it.
After having spent the evening getting the mysql rubygem installed on Windows 64 bit, I decided to (finally) get cracking on linking mysql to a local rails server. This is how I was trying to do it...
(Fairly) Exact transcript from cmd.exe
C:\rails\cookbook>gem install mysql --platform=ruby -- --with-mysql-include=c:\mysql\include --with-mysql-lib=c:\mysql\lib Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... Successfully installed mysql-2.8.1 1 gem installed Installing ri documentation for mysql-2.8.1... Installing RDoc documentation for mysql-2.8.1... (I thought this was successful mysql install, should I test it somehow?)
C:\>gem install mysql2 --platform=ruby -- --with-mysql-include=c:\mysql\include --with-mysql-lib=c:\mysql\lib Fetching: mysql2-0.3.7.gem (100%) Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... Successfully installed mysql2-0.3.7 1 gem installed Installing ri documentation for mysql2-0.3.7... Enclosing class/module 'mMysql2' for class Client not known Installing RDoc documentation for mysql2-0.3.7... Enclosing class/module 'mMysql2' for class Client not known (Same as above - I thought this was successful mysql install)
C:\rails>rails new cookbook -d mysql (successfully creates directories for project in c:\rails\cookbook)
C:\rails\cookbook>rails server ?[31mCould not find gem 'mysql2 (~> 0.2.11)' in any of the gem sources listed in your Gemfile.?[0m ?[33mRun `bundle install` to install missing gems.?[0m
Notes: I noticed it wants rubygem mysql2-0.2.11, I have 0.3.7. I tried installing 0.2.11 specifically by the method I used to install the two gems above. No dice, it couldn't find a gem by the name mysql2-0.2.11 in 'any repository'
I'm stumped, any thoughts fellas (and gals)?