Problem is that mysql2 gem is not installed..
Install mysql2 gem with source as path to mysql in order top install it
properly

On Wed, Sep 7, 2011 at 7:24 PM, venkata reddy <[email protected]>wrote:

> Hi All,
>          I successfully installed rails(3.0.10) and ruby version
> 1.9.2 and mysql version 5.5.8 on my windows7 machine. I am using
> mysisgit also.
> i am able to start any application with sqlite3 which comes default
> for rails. But problem is when i want use mysql.
> i am using
>
> "rails new appname -d mysql" for using mysql
> $ rails new appname -d mysql
>      create
>      create  README
>      create  Rakefile
>      create  config.ru
>      create  .gitignore
>      create  Gemfile
>      create  app
>      create  app/controllers/application_controller.rb
>      create  app/helpers/application_helper.rb
>      create  app/mailers
>      create  app/models
>      create  app/views/layouts/application.html.erb
>      create  config
>      create  config/routes.rb
>      create  config/application.rb
>      create  config/environment.rb
>      create  config/environments
>      create  config/environments/development.rb
>      create  config/environments/production.rb
>      create  config/environments/test.rb
>      create  config/initializers
>      create  config/initializers/backtrace_silencers.rb
>      create  config/initializers/inflections.rb
>      create  config/initializers/mime_types.rb
>      create  config/initializers/secret_token.rb
>      create  config/initializers/session_store.rb
>      create  config/locales
>      create  config/locales/en.yml
>      create  config/boot.rb
>      create  config/database.yml
>      create  db
>      create  db/seeds.rb
>      create  doc
>      create  doc/README_FOR_APP
>      create  lib
>      create  lib/tasks
>      create  lib/tasks/.gitkeep
>      create  log
>      create  log/server.log
>      create  log/production.log
>      create  log/development.log
>      create  log/test.log
>      create  public
>      create  public/404.html
>      create  public/422.html
>      create  public/500.html
>      create  public/favicon.ico
>      create  public/index.html
>      create  public/robots.txt
>      create  public/images
>      create  public/images/rails.png
>      create  public/stylesheets
>      create  public/stylesheets/.gitkeep
>      create  public/javascripts
>      create  public/javascripts/application.js
>      create  public/javascripts/controls.js
>      create  public/javascripts/dragdrop.js
>      create  public/javascripts/effects.js
>      create  public/javascripts/prototype.js
>      create  public/javascripts/rails.js
>      create  script
>      create  script/rails
>      create  test
>      create  test/fixtures
>      create  test/functional
>      create  test/integration
>      create  test/performance/browsing_test.rb
>      create  test/test_helper.rb
>      create  test/unit
>      create  tmp
>      create  tmp/sessions
>      create  tmp/sockets
>      create  tmp/cache
>      create  tmp/pids
>      create  vendor/plugins
>      create  vendor/plugins/.gitkeep
>
>
> Then "cd appname" and
> Then "bundle install"
>
> $ bundle install
> Fetching source index for http://rubygems.org/
> Using rake (0.9.2)
> Using abstract (1.0.0)
> Using activesupport (3.0.10)
> Using builder (2.1.2)
> Using i18n (0.5.0)
> Using activemodel (3.0.10)
> Using erubis (2.6.6)
> Using rack (1.2.3)
> Using rack-mount (0.6.14)
> Using rack-test (0.5.7)
> Using tzinfo (0.3.29)
> Using actionpack (3.0.10)
> Using mime-types (1.16)
> Using polyglot (0.3.2)
> Using treetop (1.4.10)
> Using mail (2.2.19)
> Using actionmailer (3.0.10)
> Using arel (2.0.10)
> Using activerecord (3.0.10)
> Using activeresource (3.0.10)
> Using bundler (1.0.18)
> Installing mysql2 (0.2.13) with native extensions c:/Ruby192/lib/ruby/
> 1.9.1/ruby
> gems/installer.rb:483:in `rescue in block in build_extensions': ERROR:
> Failed to
>  build gem native extension. (Gem::Installer::ExtensionBuildError)
>
> c:/Ruby192/bin/ruby.exe extconf.rb
> checking for rb_thread_blocking_region()... yes
> checking for main() in -llibmysql... 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.
>
> Provided configuration options:
>        --with-opt-dir
>        --without-opt-dir
>        --with-opt-include
>        --without-opt-include=${opt-dir}/include
>        --with-opt-lib
>        --without-opt-lib=${opt-dir}/lib
>        --with-make-prog
>        --without-make-prog
>        --srcdir=.
>        --curdir
>        --ruby=c:/Ruby192/bin/ruby
>        --with-mysql-dir
>        --without-mysql-dir
>        --with-mysql-include
>        --without-mysql-include=${mysql-dir}/include
>        --with-mysql-lib
>        --without-mysql-lib=${mysql-dir}/lib
>        --with-libmysqllib
>        --without-libmysqllib
>
>
> Gem files will remain installed in c:/Ruby192/lib/ruby/gems/1.9.1/gems/
> mysql2-0.
> 2.13 for inspection.
> Results logged to c:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.13/
> ext/mysql2/g
> em_make.out
>        from c:/Ruby192/lib/ruby/1.9.1/rubygems/installer.rb:486:in
> `block in bu
> ild_extensions'
>        from c:/Ruby192/lib/ruby/1.9.1/rubygems/installer.rb:446:in
> `each'
>        from c:/Ruby192/lib/ruby/1.9.1/rubygems/installer.rb:446:in
> `build_exten
> sions'
>        from c:/Ruby192/lib/ruby/1.9.1/rubygems/installer.rb:198:in
> `install'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/sour
> ce.rb:101:in `block in install'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/ruby
> gems_integration.rb:78:in `preserve_paths'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/sour
> ce.rb:91:in `install'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/inst
> aller.rb:58:in `block (2 levels) in run'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/ruby
> gems_integration.rb:93:in `with_build_args'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/inst
> aller.rb:57:in `block in run'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/inst
> aller.rb:49:in `run'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/inst
> aller.rb:8:in `install'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/cli.
> rb:220:in `install'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/vend
> or/thor/task.rb:22:in `run'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/vend
> or/thor/invocation.rb:118:in `invoke_task'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/vend
> or/thor.rb:263:in `dispatch'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/
> bundler/vend
> or/thor/base.rb:386:in `start'
>        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/bin/
> bundle:13:in
>  `<top (required)>'
>        from c:/Ruby192/bin/bundle:19:in `load'
>        from c:/Ruby192/bin/bundle:19:in `<main>'
>
> and then "rails s"
>
> $ rails s
> ←[31mCould not find gem 'mysql2 (~> 0.2.11, runtime)' in any of the
> gem sources
> listed in your Gemfile.←[0m
> ←[33mRun `bundle install` to install missing gems.←[0m
>
> and one more thing i noticed here is
> i am not able to find the version of rails when i am in the root, see
> this
>
> $ rails -v
> ←[31mCould not find gem 'mysql2 (~> 0.2.11, runtime)' in any of the
> gem sources
> listed in your Gemfile.←[0m
> ←[33mRun `bundle install` to install missing gems.←[0m
>
> But i am able find it when outside the application
> $ rails -v
> Rails 3.0.10
>
> so thats the error i am getting. i tried different methods by
> googling, but nothing worked out for me.
> I am still in my initial days and any help would be appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
sαη∂ιρ Rαηѕιηg

---
www.funonrails.com

twitter, github @sandipransing
skype sandip.ransing

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to