Installing Ruby Dev Kit on Windows 7

4,719 views
Skip to first unread message

Ash Mulekar

unread,
Jul 16, 2013, 3:36:17 PM7/16/13
to rubyin...@googlegroups.com
I have Ruby 2.0 installed and running on my Windows 7 machine. I installed MySQL on my machine. Then I followed a tutorial here which instructs to use this command "gem install Mysql"
I installed the ruby dev kit on my machine and then when I typed the command on my machine into my terminal I see this:










So my questions is what should I do now? I dont know whats not working or where to begin?
Id really appreciate some help.

Thanks

Luis Lavena

unread,
Jul 16, 2013, 6:29:42 PM7/16/13
to rubyin...@googlegroups.com

Hello, the error message states that no compiler was detected, so that indicates no devkit was installed.

Did you follow the instructions listed in the wiki page?

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

If you're getting started with ruby and rails I would suggest you install ruby 1.9.3.

I will also recommend follow this tutorial to install mysql gem:

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

Hope that helps.

Sorry for top posting. Sent from mobile.

--
You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyinstalle...@googlegroups.com.
To post to this group, send email to rubyin...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyinstaller.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ash Mulekar

unread,
Jul 19, 2013, 1:17:07 PM7/19/13
to rubyin...@googlegroups.com
Hi Thanks for your response. 

After seeing this link:

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

Yes, I installed the DevKit now and tried to test that the installation was properly done by running this command:
"gem install mysql"

When I ran that I see this at my command line:




So I am still stuck in terms of being able to use Ruby to connect to MySQL. Not sure how to proceed forward from here.

Does anyone have some suggestions?

Thanks

Luis Lavena

unread,
Jul 19, 2013, 1:24:46 PM7/19/13
to rubyin...@googlegroups.com
On Fri, Jul 19, 2013 at 2:17 PM, Ash Mulekar <ash.m...@gmail.com> wrote:
Hi Thanks for your response. 

After seeing this link:

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

Yes, I installed the DevKit now and tried to test that the installation was properly done by running this command:
"gem install mysql"

When I ran that I see this at my command line:




So I am still stuck in terms of being able to use Ruby to connect to MySQL. Not sure how to proceed forward from here.

Does anyone have some suggestions?


Hello,

You're not stating what DevKit you downloaded, and there are different ones depending on the version of Ruby.

But if is not able to find the compiler, is because is the wrong one.

Please, look at the downloads page:


For Ruby 2.0.0 x64, you need a 64bits compiler.

Down this page, several and different versions of Development Kits (DevKit) are listed. Please download the right one for your version of Ruby:

  • Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2
  • Ruby 2.0.0: mingw64-32-4.7.2
  • Ruby 2.0.0 x64 (64bits): mingw64-64-4.7.2
Most likely you downloaded the wrong one.

Please review what you did, download the correct DevKit and force the installation.

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Ash Mulekar

unread,
Jul 22, 2013, 2:52:00 PM7/22/13
to rubyin...@googlegroups.com
Hi,

Thanks for your reply. Ive been going back and forth with this problem. Ive unistalled the devkit version and reinstalled another version. but I still cannot get any gems to download. Ruby is running, but the devkit is just not working out.

So let me start from scratch:
Q1) How do I uninstall the devkit version I have the right way? Im looking here and Ive done these steps however, I dont see a gcc.bat and other files mentioned in that link, so there is nothing to delete.(Looks like they may not have been installed in the first place)

Q2) this brings me to the next question. Maybe I installed the wrong version of devkit. But How do I find which is the right version for my machine?

Thanks a lot for helping.'

Luis Lavena

unread,
Jul 22, 2013, 3:01:04 PM7/22/13
to rubyin...@googlegroups.com
Hello Ash,

To answer your questions, please see inline below.

On Mon, Jul 22, 2013 at 3:52 PM, Ash Mulekar <ash.m...@gmail.com> wrote:
Hi,

Thanks for your reply. Ive been going back and forth with this problem. Ive unistalled the devkit version and reinstalled another version. but I still cannot get any gems to download. Ruby is running, but the devkit is just not working out.

So let me start from scratch:
Q1) How do I uninstall the devkit version I have the right way? Im looking here and Ive done these steps however, I dont see a gcc.bat and other files mentioned in that link, so there is nothing to delete.(Looks like they may not have been installed in the first place)


gcc.bat and others where tricks used by older versions of DevKit, if the file is missing, that is good :)

To change the DevKit you have installed, it is simple: you need to force the installation of the new one at the "install" command:

ruby dk.rb install --force

That will ensure this new DevKit gets in the right place.

Of course, this assume you have first:

- Extracted DevKit into a folder without spaces
- "CD" into that directory from the command prompt
- Executed "ruby dk.rb init"
- Verified the right path of Ruby is listed in config.yml (as indicated, see the "review" command)

(and then you can perform the install command mentioned before)

Q2) this brings me to the next question. Maybe I installed the wrong version of devkit. But How do I find which is the right version for my machine?


The "Right DevKit" is the one listed in the downloads page:


WHICH DEVELOPMENT KIT?

Down this page, several and different versions of Development Kits (DevKit) are listed. Please download the right one for your version of Ruby:

Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2
Ruby 2.0.0: mingw64-32-4.7.2
Ruby 2.0.0 x64 (64bits): mingw64-64-4.7.2

In your case, if you download Ruby 2.0.0, you need mingw64-32-4.7.2

If you downloaded the 64bits version of Ruby (you can verify by doing "ruby -v" at the command prompt) you will need the 64bits version of DevKit.

In relation to mysql gem, I noticed that is not taking the --with-mysql-dir parameter in the newer versions of RubyGems, you can use --with-opt-dir instead.

See this thread for similar issue:


Let us know if that helps and if not, please post back the following information:

- Version of Windows (if is 32 or 64bits too)
- Version of Ruby (use "ruby -v" and paste the entire output in your response)
- Version of RubyGems (use "gem -v" and paste it here)
- What version of DevKit did you download (and under which directory you extracted it)
- What are the contents of config.yml (the file that gets generated inside the DevKit directory)
- What is the entire output of "gem install --platform=ruby json"

That will help us assist you better.

Regards.
-- 

Ash Mulekar

unread,
Jul 22, 2013, 3:55:34 PM7/22/13
to rubyin...@googlegroups.com
Hi Luis.

Thanks for your detailed reply.Here is the information:
ruby -v  = ruby 2.0.0p195 (2013-05-14) [x64-ming32]
windows = 64 bits
gem -v = 2.0.2
DevKit version: Dev-Kit-ming64-32-4.7.2-2013.......sfx.exe
Config.xml contents: - C:/Ruby200-x64
ruby dk.rb review = 
Based upon the settings in config.yml....... C:/Ruby200-x64

After running gem install json --platform=ruby I get the following output






On Tuesday, July 16, 2013 3:36:17 PM UTC-4, Ash Mulekar wrote:

Luis Lavena

unread,
Jul 22, 2013, 3:58:47 PM7/22/13
to rubyin...@googlegroups.com
On Mon, Jul 22, 2013 at 4:55 PM, Ash Mulekar <ash.m...@gmail.com> wrote:
Hi Luis.

Thanks for your detailed reply.Here is the information:
ruby -v  = ruby 2.0.0p195 (2013-05-14) [x64-ming32]
windows = 64 bits
gem -v = 2.0.2
DevKit version: Dev-Kit-ming64-32-4.7.2-2013.......sfx.exe

Here is your problem, as I mentioned before:

 The "Right DevKit" is the one listed in the downloads page:


WHICH DEVELOPMENT KIT?

Down this page, several and different versions of Development Kits (DevKit) are listed. Please download the right one for your version of Ruby:

Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2
Ruby 2.0.0: mingw64-32-4.7.2
Ruby 2.0.0 x64 (64bits): mingw64-64-4.7.2

In your case, if you download Ruby 2.0.0, you need mingw64-32-4.7.2

If you downloaded the 64bits version of Ruby (you can verify by doing "ruby -v" at the command prompt) you will need the 64bits version of DevKit.

===

You downloaded 64bits version of Ruby (x64-mingw32 is the 64bits version of the platform)

So you NEED 64bits version of the DevKit.

You downloaded the 32bits version.

Please: download the right one and proceed to install it again.

Also please read the entire instructions I provided before.

pham anh Tuan

unread,
Jul 31, 2013, 3:16:32 PM7/31/13
to rubyin...@googlegroups.com


Vào 14:36:17 UTC-5 Thứ ba, ngày 16 tháng bảy năm 2013, Ash Mulekar đã viết:
Reply all
Reply to author
Forward
0 new messages