rubyonrailsin

A Ruby and Rails talk

Wednesday, March 31, 2010


[Rails] Re: incompatible character encodings: ASCII-8BIT and UTF-8

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Gudleik Rasch wrote:
> I've been struggling with the same issue a few times, and the solution
> that worked for me was to use a different mysql driver: ruby-mysql
>
> # in config/environment.rb:
> config.gem 'ruby-mysql'
>
> # or in Gemfile:
> gem 'ruby-mysql'
>
> The encoding must also be set in config/database.yml:
> adapter: mysql
> encoding: utf8

Hey,

First of all thanks but I tried what you said and well...
gem install ruby-mysql
config/environment.rb: added config.gem 'ruby-mysql'
config/database.yml: added adapter: mysql, encoding: utf8

But when I start the server I get following error:
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
D:/ruby19/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning:
Gem::Dependency#version_requirements is deprecated and will be removed
on or after August 2010. Use #requirement
no such file to load -- ruby-mysql
...
D:/ruby19/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
`require'Missing these required gems:
ruby-mysql

You're running:
ruby 1.9.1.378 at D:/ruby19/bin/ruby.exe
rubygems at D:/ruby19/lib/ruby/gems/1.9.1

Run `rake gems:install` to install the missing gems.

I of course tried rake gems:install but it didn't help. I also tried to
just uninstall the mysql gem but that didn't work either. Any idea?
--
Posted via http://www.ruby-forum.com/.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive