Hi,
I have installed ruby 1.9.2, rails 3.0.0, mysql 5.1, Aptana Radrails,
Java,
On creating a new application using the below command line--
C:\ruby\bin\newproj>rails new newproj -d mysql
Installing mysql2 (0.2.4) with native extensions
C:/ruby/lib/ruby/1.9.1/rubygems
/installer.rb:483:in `rescue in block in build_extensions': ERROR:
Failed to bui
ld gem native extension. (Gem::Installer::ExtensionBuildError)
C:/ruby/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... *** 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.
If then i run
C:\ruby\bin\project1>gem install mysql2
The following is the output
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/ruby/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... *** 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:/ruby/bin/ruby
C:/ruby/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to
generate
an executable file. (RuntimeError)
You have to install development tools first.
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:440:in `try_link'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:552:in `try_func'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:797:in `block in have_func'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:693:in `block in
checking_for'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in
postpone
'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from C:/ruby/lib/ruby/1.9.1/mkmf.rb:796:in `have_func'
from extconf.rb:9:in `<main>'
Gem files will remain installed in
C:/ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.2.4
for inspection.
Results logged to
C:/ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.2.4/ext/mysql2/gem_m
ake.out
But since you’re just starting off with Rails, I would advise you to simply run a Ubuntu Linux virtual machine (or even completely switch to Linux right away) instead of frustrating yourself with Windows problems and avoid even more issues with native library gems in the future.
But since you're just starting off with Rails, I would advise you to
simply run a Ubuntu Linux virtual machine (or even completely switch
to Linux right away) instead of frustrating yourself with Windows
problems and avoid even more issues with native library gems in the
future.
Hi Peter,
I m running Java VM on my system. Is there any luck with WIndows that i
can expect of.....???
I need to deliver a few projects pity quick and thats why i thought RoR
would come handy....
Pls put your helping hands together...
You could run your Rails app under JRuby if you like, but that would mean using the Java MySQL drivers instead. Java VM and a VMWare virtual machine are two different things though.
You should start researching those things yourself though, since running through a whole Rails stack is out of the scope of this mailing list. Google is your friend.
Yes, in fact JRuby is a good option on Windows. Download the latest
version of NetBeans, which comes with JRuby, and you should be able to
get a Rails app up and running fairly quickly.
@Peter, Mark, Marnem: Thanks guys for the posts
I have kick started my first project.But on windows and that on a
sqlite3 db. I tried hard to get mysql but somehow its not willing to
dance with the rails on Windows platform. But still I would try out my
luck with JRuby on windows and later on if i can survive RoR i will
shift to Linux....
But if any body pokes in the direction of how to make MySQL work with
Rails on windows would be like an angel...
A number of Ruby gems like the mysql2 gem are built with extensions written in C, which means they need a properly configured compiler and tool chain on the computer they’re being installed on; without it the build process fails and the gem doesn’t install correctly.