You have to change your config/database.yml file also.
Open that and replace "mysql2" with "mysql" everywhere.


Chirag
http://sumeruonrails.com



On Thu, Sep 8, 2011 at 1:51 PM, venkata reddy <[email protected]>wrote:

> Yes that successfully starts the server.
> But when i see my application environment
>
> RuntimeError
>
> Please install the mysql2 adapter: `gem install activerecord-mysql2-
> adapter` (no such file to load -- active_record/connection_adapters/
> mysql2_adapter)
> Rails.root: c:/rails/appname
>
> Application Trace | Framework Trace | Full Trace
> Request
>
> Parameters:
>
> None
> Show session dump
>
> Show env dump
>
> Response
>
> Headers:
>
> None
> Getting started
> Here’s how to get rolling:
>
> Use rails generate to create your models and controllers
> To see all available options, run it without parameters.
>
> Set up a default route and remove or rename this file
> Routes are set up in config/routes.rb.
>
> Create your database
> Run rake db:migrate to create your database. If you're not using
> SQLite (the default), edit config/database.yml with your username and
> password.
>
> On Sep 8, 12:56 pm, Chirag Singhal <[email protected]> wrote:
> > Easiest way to get it to work would be to use mysql gem instead of mysql2
> > gem.
> > Open up your Gemfile and replace
> > gem 'mysql2', '~> 0.2.11'
> > with
> > gem 'mysql'
> >
> > And open up your database.yml fine and change adapter from mysql2 to
> mysql
> >
> > Chiraghttp://sumeruonrails.com
> >
> > On Thu, Sep 8, 2011 at 1:08 PM, venkata reddy <[email protected]
> >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Anybody using rails 3.0.10 and ruby1.9.2 with mysql 5.5.8 on 32 bit
> > > windows7?
> >
> > > On Sep 8, 12:17 pm, venkata reddy <[email protected]> wrote:
> > > > Hi Luis,
> > > > Thanks for your time. But still i am not able to do..getting panic
> > > > with rails on windows..
> >
> > > > On Sep 7, 8:57 pm, Luis Lavena <[email protected]> wrote:
> >
> > > > > On Sep 7, 10:54 am, 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
> >
> > > > > Short answer:
> >
> > > > > Install either mysql or mysql2 gem following these instructions:
> > >http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x6.
> ..
> >
> > > > > Long answer:
> >
> > > > > Rails is defaulting to mysql2 and attempting to compile latest
> > > > > version.
> >
> > > > > Gem compilation will attempt to find libmysql and headers to link
> to,
> > > > > but these are not available unless you supply the --with-mysql-dir
> > > > > option during gem installation.
> >
> > > > > Since Bundler doesn't support that, you should install the gem
> prior
> > > > > doing the bundle install, which will solve Bundler attempting to
> > > > > download and install the gem again.
> >
> > > > > The provided tutorial will work with any version of MySQL installed
> > > > > since it will not use any file from it. Instead, it will use the
> > > > > standalone Connector component, which gives you freedom to update
> > > > > MySQL later.
> >
> > > > > > 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
> >
> > > > > That is because you're inside an application folder and "rails"
> will
> > > > > attempt to run in the context of your application (so rails
> generate,
> > > > > rails server and others) work.
> >
> > > > > Hope this helps.
> >
> > > > > Cheers,
> > > > > --
> > > > > Luis Lavena
> >
> > > --
> > > 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.
>
> --
> 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.
>
>

-- 
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