Skip to content

Instantly share code, notes, and snippets.

@remomueller
Last active April 5, 2018 09:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remomueller/5027829 to your computer and use it in GitHub Desktop.
Save remomueller/5027829 to your computer and use it in GitHub Desktop.
Installation of Ruby 2.0.0-p0 on Windows 7 (64-bit) with DevKit and MySQL instructions

Install Ruby

Run rubyinstaller-2.0.0.p0.exe

  • Add Ruby executables to your PATH
  • Associate .rb and .rbw files with this Ruby installation

Initialize DevKit

Run DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe

  • Extract to C:\DevKit-x64

Open command shell

cd C:\DevKit-x64
ruby dk.rb init
ruby dk.rb install

Windows (x86, 64-bit), ZIP Archive - mysql-connector-c-noinstall-6.0.2-winx64.zip

Open and extract to C:\mysql-connector-c-noinstall-6.0.2-winx64

gem install mysql2 --no-ri --no-rdoc --platform=ruby -- --with-mysql-include=C:/mysql-connector-c-noinstall-6.0.2-winx64\include --with-mysql-lib=C:/mysql-connector-c-noinstall-6.0.2-winx64\lib

Copy libmysql.dll to Ruby installation bin

copy C:\mysql-connector-c-noinstall-6.0.2-winx64\lib\libmysql.dll C:\Ruby200-x64\bin\libmysql.dll

More gems for Rails

Update and install Bundler, v1.3.0.pre.8 currently has a bug.

gem install bundler -v=1.3.0.pre.7 --no-ri

If using thin in your Gemfile, then you may also need to manually install eventmachine

gem install eventmachine -v1.0.0  --platform=ruby --no-ri

Time to go to your Rails directory

cd C:\..\railsapp
bundle update
@factoryexpodonovan
Copy link

I noticed you have the download link for rubyinstaller pointing to the 32 bit version.
Shouldn't it be http://files.rubyforge.vm.bytemark.co.uk/rubyinstaller/rubyinstaller-2.0.0-p0-x64.exe

@svisamsetty
Copy link

i have the same question. should it not be 64 bit? please clarify.

@kanakinfosystems
Copy link

i follow above step and finish to all step but end of this step after i create new project "simple_cms" (rails new simple_cms -d mysql). then after i execute "rails server" following error occur.

already i install "gem install activerecord-mysql2-adapter" but still problem arise...

problem is serious thanks advance...

A:\Misc\RoR\project\simple_cms2>rails server
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb:214:in block in replace_gem': Please install the mysql2 adapter:gem install activerecord-mysql2-adapter(mysql2 is not part of the bundle. Add it to Gemfile.) (LoadError) from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:3:in<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:inblock in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in load_dependency' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:inrequire'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in resolve_hash_connection' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:inresolve_string_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in spec' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:inestablish_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/railtie.rb:82:in block (2 levels) in <class:Railtie>' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:ininstance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:36:in execute_hook' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:43:inblock in run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in each' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:inrun_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/base.rb:720:in <top (required)>' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/active_record/railtie.rb:88:inblock in class:Railtie'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:in instance_exec' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:30:inrun'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:55:in block in run_initializers' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:ineach'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/initializable.rb:54:in run_initializers' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:136:ininitialize!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in method_missing' from A:/Misc/RoR/project/simple_cms2/config/environment.rb:5:in<top (required)>'
from A:/Misc/RoR/project/simple_cms2/config.ru:3:in require' from A:/Misc/RoR/project/simple_cms2/config.ru:3:inblock in

'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in instance_eval' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:ininitialize'
from A:/Misc/RoR/project/simple_cms2/config.ru:in new' from A:/Misc/RoR/project/simple_cms2/config.ru:in'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in eval' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:inparse_file'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in app' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:46:inapp'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in wrapped_app' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:instart'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in start' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:55:inblock in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in tap' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/commands.rb:50:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in'

A:\Misc\RoR\project\simple_cms2>

@fangge
Copy link

fangge commented Mar 31, 2014

thx for download link!!!

@64vintage
Copy link

Worked perfectly; thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment