Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Rails installation on windows

INSTALLATION windows

  • Please log in to reply
13 replies to this topic

#1 jayan

jayan

    Passenger

  • Members
  • 8 posts

Posted 20 February 2014 - 04:47 AM

Hello World,

 

Am trying to install ruby on rails 4 on Windows 8 -62bit but is faced with some problems.

 

Could install Ruby 2, DevKit, also updated the Gem. Rails installation would not work. Till day before yesterday it was ruby 4.0.2 but yesterday it has changed to 4.0.3 hence trying to install it in the following way.  A snap shot of my command prompt has been pasted below.

 

C:\DevKit>gem install rails --version 4.0.3 --no-ri --no-rdoc
ERROR:  Could not find a valid gem 'rails' (= 4.0.3), here is why:
          Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT:
 A connection attempt failed because the connected party did not properly respon
d after a period of time, or established connection failed because connected hos
t has failed to respond. - connect(2) (https://api.rubygems.org/specs.4.8.gz)
ERROR:  Possible alternatives: rails


C:\DevKit>

 

Had tried this on my Win7 before.  Had the same problem.  Therefore changed to a clean install of Win8.  But the problem is same.

 

Kind help me on this as it is driving me crazy and cannot take my first step into rails-world.

 

Best Regards



#2 jack

jack

    Signalman

  • Moderators
  • 19 posts
  • LocationPoole

Posted 20 February 2014 - 10:15 AM

Hi Jayan,

 

As a Windows user, I actually find it far simpler to use a Linux virtual machine running on my PC to do rails development.

 

Doing so means that I don't have to worry about the slightly dodgy support of rails on Windows, and the availability of libraries/binary dependencies is better. It just feels like a better experience to me.

 

I know this isn't exactly a solution, more of a friendly piece of advice.

 

Thanks,

Jack


  • james likes this

#3 jayan

jayan

    Passenger

  • Members
  • 8 posts

Posted 20 February 2014 - 01:05 PM

Thank you Jack,

 

Which Linux do you recommend ?  I can set up a dual boot on my PC.

 

Hope the installation of rails in Linux is easy ...



#4 james

james

    Guard

  • Moderators
  • 221 posts
  • LocationLeeds, U.K.

Posted 21 February 2014 - 12:12 PM

Shameless promotion for my favourite Linux distro :)

I'd recommend Linux Mint.

I switched from Windows as my main O.S. to Ubuntu a few years back but then they changed their desktop from Gnome to their own Unity. I tried to stick with it for about 6 months but I just didn't like it not even after I changed and tried different desktops.

In the end I switched to Linux Mint with the Cinnamon desktop and I absolutely love it. It has Ubuntu as it's base so you get all the Ubuntu goodness such as a decent software manager, reliable and oh so simple installation and there is sooo much support and help it is ridiculous.

 

Haven't touched a Windows box in years :)

http://www.linuxmint.com/


  • jack likes this

Programming is just about problem solving!


#5 jack

jack

    Signalman

  • Moderators
  • 19 posts
  • LocationPoole

Posted 24 February 2014 - 09:45 AM

Mint with Cinnamon is wonderful. Personally I still use Ubuntu, but I have no real reason to prefer either. It is very rare that I ever need the GUI, as most of what I do is terminal based.


  • james and dailammoc like this

#6 jayan

jayan

    Passenger

  • Members
  • 8 posts

Posted 28 February 2014 - 06:48 AM

* Have purchased a new hard disk and installed win 8 32bit.

* It still does not work

* I think I will install Linux - Mint with Cinnamon as per your recommendation

* I have used only windows in my life and require it as I do development with Delphi and Visual studio, as a hobby.  Therefore cannot discard it.

* I will install Linux in a partion

* Hope the Installation of Rails is easy.  Any help / links in this regard will be helpful.  Of course, I will do my own searching, but still...

* Vagrant is an option ... But go to do so many things ... new to this world


  • james likes this

#7 james

james

    Guard

  • Moderators
  • 221 posts
  • LocationLeeds, U.K.

Posted 28 February 2014 - 11:29 AM

Forget Vagrant. You don't need it, should never need it and at this stage I would suggest adds too much of a learning curve.

 

Dual boot is the best option, installing Rails is a lot simpler on Linux than it is on windows. Whilst the software manager is your friend (Sort of an app store) Don't install Rails from the software center. Use RVM and follow the instruction in the book. For most things when you are looking up how to do stuff in linux Ubuntu and Mint instructions are interchangeable. Mint is a derivative of Ubuntu.

As an alternative to AWDWR instructions, these ubuntu instructions are up to date (at time of writing) and are dead simple to follow.

http://railsapps.git...ils-ubuntu.html

 

I feel for you with regards to Delphi and Visual Studio. I have used both in anger in the past although too many years ago now. You have no option other than to keep windows for these, however, they may work well in a virtual machine under Linux with Virtualbox http://lifehacker.co...n-app-for-linux which again can be found in the software center.

Your need to go hunting around the net for software will be dramatically reduced and 99% of the doftware you install will be free open source and a real eye opener.

 

You will find virtualbox in the software center.

 

You have a lot to get your head round but you will find Linux a true eye opener. Mint is dead simple to install. Use a live CD/DVD, just download an iso image from the mint site http://www.linuxmint.com/download.php and burn to DVD, then boot up with the DVD and you will be able to have a play with Linux before installing it although anything you do will not be saved until it is installed. Once you have finished playing there is an install link on the desktop, when asked what format to use for the file system choose ext4

The installation process will automatically detect that you have Windows installed and will ask if you want to keep it and will automatically set up a menu for you the next time you switch your P.C. on to choose if you want to boot into Windows or Linux.

 

The actual installation process is very quick compared with a Windows install, no licence keys to worry about, but make sure you pick a secure but memorable and more importantly easy to type password. When doing potentially destructive actions in Linux such as using sudo or installing software you will be asked to type your password.

 

Warning, not all Linux distros are this easy to install, if you choose to go with a different distro (arch for example) then you really have to know your onions. Debian based distros or more importantly Ubuntu spin offs are all dead simple to set up.

 

With Linux unlike windows, where Windows is the desktop, you have a choice of desktops, in fact there are so many different desktops to choose from it is mind boggling, stick with Cinnamon or Mate until you feel ready to try some others out.

 

I know you didn't ask for pointers on Linux but there is no point me recommending you go with something you are unfamilar with and leaving you in the cold!

If you need any further help just shout


  • jack likes this

Programming is just about problem solving!


#8 jayan

jayan

    Passenger

  • Members
  • 8 posts

Posted 09 March 2014 - 06:07 AM

Have installed Linux Mint on Virtual machine.  But seems to be slow.

 

Am dedicating an old PC for Linux and rails development.  Think that will be better.  Is it better to go with Ubuntu or Mint ???

 

Also I have created an account on Nitrous.IO.  Are there any other services ...

 

Besides Linux / Rails I will also dabble with PHP / Laravel development in Linux.


  • james likes this

#9 james

james

    Guard

  • Moderators
  • 221 posts
  • LocationLeeds, U.K.

Posted 09 March 2014 - 01:41 PM

It will be slow on a virtual machine because a virtual machine is not using all your P.C. resoucres e.g. half the amount of RAM, half the amount of video ard resources etc... depending on how you set up your VM in virtualbox.

If you want it to speed up then give it more resources.

As far as which is best Mint or Ubuntu, well there are literally hundreds of Linux Distros to choose from, you can find them all here http://distrowatch.com/

What you really need to understand is that both are based on Debian, in fact Mint is based on Ubuntu, both are extremely good and require relatively little technical knowledge to set up and use. The main difference is the desktops, although you can use many different desktops in whichever distro you choose I have found it to be a nicer experience to go with the distro that offers the desktop you prefer as a default option.

History,

Some years ago Ubuntu was THE distro for desktop users, by a looong way the most popular until they switched from a Gnome 2 derivative desktop and rather than going with Gnome 3 they decided they were going to go down the one desktop fit's all and brought out their own Unity Desktop. Microsoft copied that direction a year later with Windows 8 and the opinions of users are pretty much the same. Ubuntu was divided in the same way that windows users are divided so along came mint. They took the core Ubuntu distro, and wrote their own desktops (Mate and Cinnamon) to cater for those that liked the old Gnome 2 desktop and those that liked the Gnome 3 desktop and whilst there is no real way of knowing which is the most popular distro the indication is that Mint is now more popular than Ubuntu.

 

I could write a book on this but it's not really going to help you, you have to try them out and go with what you like but for Widows users migrating to Linux I would recommend Mint with Cinnamon every time simply because of the familiarity factor and the lower learning curve, Both Mint and Ubuntu are extremely stable and their are pro's and cons for each, I prefer the Upgrade route taken by Ubuntu but every day user experience I prefer Mint. Distros such as Fedora are very cutting edge and require a lot of technical skills to use and the likes of CentOs are more for server, non desktop use.

 

p.s.

Nice one for trying it out


Programming is just about problem solving!


#10 jayan

jayan

    Passenger

  • Members
  • 8 posts

Posted 15 March 2014 - 06:51 PM

Dear James & Jack,

 

I have finally installed Linux Mint on the machine running Win 8.  Have dedicated an old Hard disk for it. 

 

Now the next battle ... is to install rails ...

 

Thanks for all your help.

 

Regards



#11 james

james

    Guard

  • Moderators
  • 221 posts
  • LocationLeeds, U.K.

Posted 15 March 2014 - 08:21 PM

I would recommend installing Ruby via rvm or rbenv, I prefer rvm but only because of familiarity with it.

Once you have ruby installed then just run "gem install rails" from the command line and that's it! job done :)

 

rbenv documentation can be found here https://github.com/sstephenson/rbenv

rvm doc's are here http://rvm.io/rvm/install

 

Also might be worth watching some railscasts

 

http://railscasts.co...-3-beta-and-rvm

 

http://railscasts.co...loying-to-a-vps

 

That last link is all about deploying to a vps which you may find usefull later but it also covers setting up Rails in Ubuntu, it's just that the configuration is more for a live production server so at this stage you would probably only be interested in the setting up of rbenv or in the show notes the alternative setup for rvm This also shows how to install curl and some essential libraries like libxml


Programming is just about problem solving!


#12 jayan

jayan

    Passenger

  • Members
  • 8 posts

Posted 18 March 2014 - 08:33 PM

Looks like I have similar problems with Linux too.  Do you think this is because of the speed of the internet ???  I am on 2mbps broadband connection .

 

jayan@jayan-linux-mint ~ $ gem install rails
ERROR:  Could not find a valid gem 'rails' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Connection timed out - connect(2) for "s3.amazonaws.com" port 443 (https://api.rubygems.org/latest_specs.4.8.gz)
ERROR:  Possible alternatives: rails
 
 
HELP HELP


#13 jayan

jayan

    Passenger

  • Members
  • 8 posts

Posted 19 March 2014 - 01:27 PM   Best Answer

So what I suspected was right.  Looks like it is the slow internet connection that was the culprit.  Though it is an 2 mbps connection, it was not giving the full speed.  I borrowed my friends modem and connected it to desktop.  It it did start the install but got aborted twice.  However the 3rd time it did complete.  Could see the welcome screen in the browser.

 

I think we unnecessarily blamed windows.  I am sure I can install rails in windows also without problem. 

 

Anyway, this got me introduced to Linux. 

 

Than you...


  • james likes this

#14 jayan

jayan

    Passenger

  • Members
  • 8 posts

Posted 27 March 2014 - 08:37 PM

Finally I got rails installed on Win 8 too.







Also tagged with one or more of these keywords: INSTALLATION, windows

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users