RubyInstaller RubyInstaller Downloads
- Download Ruby 2.0.0-p0
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
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
cd C:\..\railsapp
bundle update
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:in
block 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:in
require'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:in
resolve_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:in
establish_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:in
instance_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:in
block 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:in
run_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:in
block 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:in
run'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:in
each'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:in
initialize!'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:in
block infrom 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:in
initialize'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:in
parse_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:in
app'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:in
start'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:in
block 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>