Complete Steps Install Ruby on Rails on Windows - ruby-on-rails

Can anyone tell me complete steps install Ruby on Rails 4.2 on Windows (Windows 10)?

I don't know about Windows 10, but we have it working on Windows 7.
Here are the steps on how to do it:
Install Ruby
Install RubyGems
Download & install Rails through RubyGems
Install any third-party dependencies (ImageMagick & MYSQL2 can take some time)
Here are the specifics:
Installing Ruby is the most difficult part on Windows, mainly because you have to compile it before installing.
There are tools which have done this for you, including RubyInstaller and RailsInstaller:
If you're a total newbie, especially to compiling in Windows, you'll want to use one of the above. If you fancy the challenge, you could compile Ruby yourself with Makefile.
--
After you've got Ruby onto your system, you then need to get RubyGems. This should work pretty straightforwardly, although it may be the case that you'll have to play around with your system's settings to get it working properly.
Here is a good tutorial:
RubyGems is simply a way to connect Ruby with any of the "gem" depositories which are available. Gems are basically "plugins" / "libraries" / "dependencies" for your Ruby install, allowing you to call them in applications.
Rails is a gem.
If you therefore want to install Rails, you need to be able to get RubyGems working.
After that, you'll be able to download and install Rails, which can be done as simply as typing gem install rails in your cmd.
--
After that, you'll be able to add extra dependencies to your system, such as ImageMagick or Mysql2 to get Rails working with external resources.
This is the really tricky part on Windows, as since it's built with MinGW32, many of the core components of Ruby/Rails have to be built independently.
Ubuntu/Mac are preferred OS's for many developers simply because they support most dependencies out of the box.

Related

Ruby On Rails Install

I've spent some time in web development and since I have decided that ruby is quite a nice language to code in I want to try the reason why some people say ruby got known : Rails
I installed rails in my linux machine however I am now trying to develop it in Windows. I know that it was recommended to install rails using RVM in linux however I'm not sure what is the best way to install it in Windows since I've read articles which said that
gem install rails
is a method which will cause you lots of bugs in both linux and windows
My question to you is what is a method which is "bugless" to install rails in windows?
Is
gem install rails
actually buggy?
Yeah, installing Rails on Windows is a little more complicated, but that's why they have bundles for it.
Go here and follow instructions.
http://railsinstaller.org/en

Upgrade to ruby 1.9.3 with rvm or brightbox gems

I currently use rvm on my dev box (osx) but I use the system ruby on my server (1.8.7 on Ubuntu 10.04)
I want to upgrade the server to 1.9.3 and have been researching the best way to do it.
The server is running about four Rails applications all on version 3.2.11.
My options appear to be using rvm or alternatively using the 1.9.3 deb package and the ruby-switch gem provided by BrightBox (who also provide passenger packages)
The Brightbox packages appear to be a clean way to go but I thought I would ask a question here to see if there are any advantages or disadvantages of either approach that I have not thought about.
Rvm is useful when you need to have two or more versions of Ruby on the same machine. Development machines tend to have this. There is no need to use a version manager if your production box only requires one version of Ruby.
To this effect, I'd suggest you're correct in doing a single installation from the deb package. I can see the ruby-switch gem gives similar functionality to rvm - up to you as to whether that's important. But if you're using three apps on the same version of ruby, it may not be!

need help installing ruby on rails

I'm installing 1.87.
I got ruby installed and ruby gems
then I tried this from the command prompt: gem install rails
and it gave me this error: http://screencast.com/t/wmBr2b1vC5I
I got the devkit like it suggested and put it in a directory on my desktop but when I went to github for instructions I got lost.
Can someone help guide me step by step? I'm used to PHP and MySQL using WAMP so running things from the command line is new to me.
A lot of gems require native code to be built and linked to as they're being installed. Unfortunately, Windows does not provide any compiling and linking tools, so you have to take one of several routes to enable building native code in Ruby gems.
I've always used Cygwin in the past to accomplish this, but there's also the Ruby Installer which may benefit you more.
Ruby Installer: http://rubyinstaller.org/
You'll probably need to remove your current Ruby install before running the installer, but it should give you everything you need to make installing Rails possible.
If you don't want to use the full installer, you can download "Development Kit", which is part of the installer, to just add the necessary build tools to your command-line environment.
Development Kit: https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe

Install twitter gem on windows7

Trying to setup a windows development machine for a Rails project that has a dependency on the twitter gem.
I get an error when I try and do gem install twitter.
It needs to build native extensions and using --platform=mswin32 didn't work like for other GEMs
Using ubuntu is really not an option. I need the computer I am using for too many other windows things.
You have probably heard this before, but as you get more seriously into ruby stuff, you are going to run into more and more issues running ruby on windows.
That being said, if all you need is to compile, head over to http://rubyinstaller.org and install your ruby through the provided installer. After that is done, hit "Add Ons" off of the main page, and download the dev kit. Extract that in your ruby directory, and you should now be able to build native extensions.

One-Click install for Ruby/Rails/SQLite?

I'm used to the One-Click install local environments of MAMP. Is there a Ruby equivalent... a download that you run and instantly get the most current versions of Ruby, Rails, SQLite running locally?
I'm using a Mac, running Leopard, and am aware that all of the aforementioned technologies ship with Leopard (except maybe SQLite). The books that I have reference newer versions and the last thing I need is to try to retrofit a tutorial to work with my version.
And one more less important question: What are "Gems" and is that something that I need to make sure is fully updated too?
Installation is pretty confusing when you first start with Rails! Even though a lot of what you need is already installed if you are using Mac, personally I found it really hard to find come concise information on how to best go about setting things up.
Since I didn't want anyone else to go through the headaches that I had when configuring their Mac development environment, I've written a 7 step guide to installing Ruby on Rails, MySQL, Apache with PHP, and phpMyAdmin on OSX Leopard. In short, everything you should need to get developing locally on your Mac!
Here's the link:
http://waavoo.com/2009/7-step-guide-installing-ruby-on-rails-mysql-apache-php-phpmyadmin-intel-mac-os-x-leopard/
Hope that helps!
Take a look at FiveRuns Install. It's a free Ruby on Rails stack that you can download.
RubyGems is the Ruby standard for publishing and managing third party libraries. Check out the User Guide.
Have fun!
I have no idea what mac os are you in but Leopard (10.5.x) already have ruby installed, all you need is to updated the gems using
gem update rails
in your command line.
if you're on Tiger (10.4.x) the installation is broken, and please follow this link.
You should also have a look at Phusion Passenger - this, along with the prefpane, allows you to have apache VirtualHosts set up the easy way.
Current versions of Rails are designed to work (for development) without needing an AMP -style stack, by using SQLite and a small Ruby Web server, so if you will only be doing Rails development you don't need to set up a stack - you can just type "rails" and it will work.
BUT the versions of RubyGems and Rails shipped with Leopard are now outdated, though, so you'll need to upgrade these before you go too far. There's an article that I wrote on setting up a Mac for development here, but the minimum commands go like this:
sudo gem install rubygems-update
sudo update_rubygems
sudo update_rubygems (yep, twice)
sudo gem update --system
These get RubyGems up to the current release, so that you can upgrade Rails safely. To do that, type:
gem update rails
The last command doesn't have sudo, because if you omit it, current versions of RubyGems will install a clean copy of the gems into your home directory, leaving the system versions untouched.
Finally, amend the .profile file in your home directory, so that the line with PATH in it says:
export PATH=$HOME/.gem/ruby/1.8/bin:$PATH
Close up any terminal windows for this to take effect. The utilities provided by the gem packages in your home directory will now have precedence over the system versions.
This means that you can type "rails" and the latest version will run, but you haven't messed with any of the software provided by Apple (apart from the system copy of RubyGems).
To upgrade your private copy of Rails whenever a new version comes along in future it's just this again:
gem update rails
just refer this....
http://wiki.rubyonrails.org/getting-started/installation/windows#installing_ruby_on_rails_on_windows
BitNami RubyStack is exactly what you are looking for http://bitnami.org/stack/rubystack

Resources