On Tuesday, March 20, 2012 1:54:25 AM UTC-3, Ruby-Forum.com User wrote:
>
> Hey all,
>
> I'm trying to learn RoR with absolutely no programming experience
> following the ruby on rails essentials tutorial on lynda.com. I'm still
> very early in the video series and I created a new project using the
> command:
>
> rails new simple_cms -d mysql
>
> but when I try to launch the web server, this happens:
> C:\Users\j\Sites\simple_cms>rails server
>
> C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in
> `require': 193: %1 is not a valid Win32 application.   -
>
Most likely this is caused by an incorrect version of "libmysql.dll" that 
you have in your system.

Some version info just in case:
> C:\Users\j\Sites\simple_cms>ruby -v
> ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
>
> C:\Users\j\Sites\simple_cms>mysql --version
>
> mysql  Ver 14.14 Distrib 5.5.21, for Win64 (x86)
>
> I've already searched the web looking for solutions, but none of them
> seem to work. Any help would be greatly appreciated, thank you.
>
>
Ruby 32bits can't be matched or use 64bits version of MySQL dlls.

Please read this:
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

You can skip the steps that involve installing MySQL itself, but not the 
ones about using MySQL Connector/C (32bits) and link mysql gem to it.

It is recommended that once you compile the gem, copy the libmysql.dll 
provided inside MySQL Connector/C to your Ruby bin directory and ensure 
Ruby bin directory is *before* MySQL one in the PATH (you can check that 
with "SET PATH" from the console)

Also, once you do this, ensure you're pointing to the right version in your 
Gemfile, or bundler will complain and ask you to bundle install, which you 
should avoid.

Always install gems outside bundler when you need to provide additional 
compilation flags, the do "bundle check" to ensure it picks the manually 
installed gem.

Also, remove the previous installed version.

Hope that helps.
--
Luis Lavena

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/JLQISMi9QSQJ.
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