Solved

Rails Newbie has major setup issue on windows

Posted on 2010-08-17
5
767 Views
Last Modified: 2012-05-10
I've been plowing through rails tutorials and resources over the past several weeks hoping to get up to speed to help contribute on a rails project with colleagues.  Setting up my environment has been very challenging.

Current Setup:
Windows XP
Rails 3.0.0.beta4*
Ruby 1.9.2dev
(I've installed 3.0.0rc2 via gem install rails --pre, it doesn't show when using the command "rails -v"

I am seemingly unable to install gems:
Example:
"gem install devise" results in:

Building native extensions.  This could take a while...
ERROR:  Error installing devise:
        ERROR: Failed to build gem native extension.

"C:/Documents and Settings/<USER NAME REMOVED>/.pik/rubies/Ruby-192dev-preview
3-1/bin/ruby.exe" extconf.rb
creating Makefile

make
'make' is not recognized as an internal or external command,
operable program or batch file.

Open in new window



I have these gems currently installed:
C:\groovy>gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.0.rc, 3.0.0.beta4)
actionpack (3.0.0.rc, 3.0.0.beta4)
active_merchant (1.5.2)
activemodel (3.0.0.rc, 3.0.0.beta4)
activerecord (3.0.0.rc, 3.0.0.beta4)
activeresource (3.0.0.rc, 3.0.0.beta4)
activesupport (3.0.0.rc, 3.0.0.beta4)
arel (0.4.0)
builder (2.1.2)
bundler (1.0.0.rc.5)
chronic (0.2.3)
coderay (0.8.357)
erubis (2.6.6)
hoe (2.6.1)
i18n (0.4.1)
json_pure (1.4.6)
lesstile (0.3.0)
mail (2.2.5)
mime-types (1.16)
minitest (1.6.0)
mocha (0.9.8)
mysql (2.8.1 x86-mingw32)
pg (0.9.0 x86-mingw32)
polyglot (0.3.1)
rack (1.2.1, 1.1.0)
rack-mount (0.6.9)
rack-test (0.5.4)
rails (3.0.0.rc, 3.0.0.beta4)
railties (3.0.0.rc, 3.0.0.beta4)
rake (0.8.7)
rdoc (2.5.8)
rspec (1.3.0)
rspec-rails (1.3.2)
rubyforge (2.0.4)
thor (0.14.0, 0.13.8)
treetop (1.4.8)
tzinfo (0.3.22)
warden (0.10.7)
will_paginate (2.3.12)

Any help would be greatly appreciated.
0
Comment
Question by:moondowg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 4

Expert Comment

by:ericnils
ID: 33458656
It sounds like you might need to:

Install Cygwin or
Add the make package to your Cygwin Install or
Add c:\cygwin\bin to your PATH (I'm assuming that c:\cygwin is your installation path for cygwin)
0
 

Author Comment

by:moondowg
ID: 33460928
Thanks for the quick follow up.

I have cygwin install and have no idea where to find the make package.  Downloaded the most recent version as was stated in many tutorials and "make" wasn't an install option.

the path includes the cygwin\bin directory.

And here's the really embarrassing question: why do I need cygwin?  isn't this a means of replicating a linux environment?  My brain is totally not wrapped around this and I just want to get coding -- something I sorta of understand...
0
 
LVL 4

Accepted Solution

by:
ericnils earned 250 total points
ID: 33467245
To install make run Cygwin's setup.exe again.  
When you get to the Select Packages step click the View button in the upper right.  That will give you a full fiew of all available packages
Scroll way down to the make package (they are in alphabetical order) and on that link click the work Skip with the little refresh icon next to it.  That will select it for installation.  Continue your install.

Why you need Cygwin is not an unusual question, especially for someone new to Unix or programming.  Windows does not include tools for compiling software and most non-Microsoft programming languages are primarily oriented towards Unix development environments.  Ruby Gems depends on some Unix tools to compile software and Cygwin is the easiest way to get a Unix environment running on a Windows machine.  Make is a command to compile source code into an executable application.

On a note unrelated to this problem you may want to consider setting up a future development environment in a Linux or OSX environment.  It will make your life a lot simpler.  You could do this with a virtual machine while continuing to use Windows if you want.  This blog post (http://techiferous.com/2010/07/roadmap-for-learning-rails) about learning Rails states the reason behind this very well:

"When you’re first starting out, don’t make unusual choices, such as learning to program Rails on Windows. One of the strengths of Rails is the community, but if you’ve made unusual choices, you’ll quickly find yourself without much help."
0
 
LVL 12

Assisted Solution

by:JESii
JESii earned 250 total points
ID: 33501465
I think there's an easier way, although cygwin is very nice.

Get a make utility that's native to windows.  Check out http://gnuwin32.sourceforge.net/packages/make.htm which gives you a gnu make for windows.  All you have to do is download it, put it into one of your executable directories that are in your path, and away you go.

In the past, I used nmake.exe (from MS) and renamed it to make, but I don't think you have to do that anymore.
0
 
LVL 4

Expert Comment

by:ericnils
ID: 34628236
Some progress has been made in the Rails on Windows department.  I highly recommend reviewing Rails Installer here: http://www.rubyinside.com/rails-installer-ruby-and-rails-on-windows-in-a-single-install-4201.html
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: narshlob
If you've ever programmed in Ruby and have come across either a proc or a lambda, you might have been wondering what the difference is between the two and when you would use one over the other. This article will try to explain the difference between…
In Ruby, Call or invoke a API DLL library is easily via Win32API class, win32-api gem or other gems. For general DLL API call, there are quite a few references, some good tips list below: http://www.rubytips.org/2008/05/13/accessing-windows-api-fro…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question