I used the one-click installer to install 1.86 a while back.
I wanted to upgrade to 1.9 but since there's no one-click installer for 1.9 I just downloaded the 1.91 binary and overwrote my 1.86 install.
Didn't work so well. I got errors all over the place afterwards.
What's the proper way to upgrade (for a dummy, i.e. me)?
The downloads page has three options for Windows:
* Ruby 1.8.6 One-Click Installer (md5: 00540689d1039964bc8d844b2b0c7db6) Stable version (recommended)
* Ruby 1.8.7-p72 Binary (md5: d4b04ba03a76dc70120fe96ffa22e5df) Stable version (recommended)
* Ruby 1.9.1-p0 Binary (md5: 921db53c709ce20106610f7d229e24e1) Stable version (recommended)
Normally should it be ok to install 1.86 with the one-click installer and then overwrite the install directory with 1.9? Or should I not have done that?
Is there a better way to do a clean install of 1.9?
I guess I'm just not sure how to install 1.9 without using the 1.86 one-click installer first.
To install, just extract the zip file into a folder of your choice. You will find that it gives you a folder structure roughly equivalent to what you see with in your 1.8 install folder. Scite and the Samples are missing, and of course you won't have your Start menu shortcuts.
I would recommend that you install Ruby 1.9 into a folder separate from your 1.8 install, then change your path statement to point to this new folder.
What is likely happening is that you are pulling in gems or other code that is incompatible with 1.9. A fresh 1.9 install will give you a better idea as to what code is missing and/or needs to be updated to work.
--Bruce
Ruby 1.9 probably installed just fine, but last time I heard 1.9 is still not 100% compatbile with Rails, although the very basics are meant to work. Are you aware of this being the case?
Related
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.
I removed the previous version of ruby I installed, ruby 1.9.1 to be precise, on my Ubuntu, and installed version 2.2.3. When I try to run bundle install on my terminal, I get this error
bash: /usr/local/bin/bundle: /usr/bin/ruby1.9.1: bad interpreter: No such file or directory.
Can anyone advice on how to fix it?
How did you remove the old version of Ruby?
It looks like it left the binary executable for bundler, so I'm guessing you just straight up deleted the usr/bin/ruby folder? Ruby installations (and most installations) tend to create executable binaries in other folders that need to be deleted as well.
I would highly recommend that you use something like rvm or rbenv to manage multiple versions of ruby on your system. Those tools are designed to do that sort of thing and are basically industry standard at this point.
My personal recommendation is rvm, although either is really fine. If you choose to go with that, check out rvm.io for installation instructions.
It'll install rvm with the latest ruby version. In addition to that you are free to install any other version of ruby or patch that you prefer, and you can easily switch between the two using rvm use <ruby version>
I've looked through all of the topics on here and cannot find an answer.
All of the answers say to use RVM or PIK but I am on windows and pik is outdated/unusable.
When I deleted all of the ruby 1.9.3 files and typed ruby -v it showed my 2.0 was running.
However when I deleted the ruby files, rails 4.0 got uninstalled.
Everytime I reinstall rails from railsintsaller.org it reboots the 1.9.3
I tried switching the paths in computer > properties > advanced system settings but not sure if that helps or if I got it right.
It is really frustrating that the newest rails download overwrites the lates ruby files and knocks me back a version.
Can anyone help me I am on Windows 7 Home Premium 64 bit...not a lot of help for this system out there...
Jesse,
Speaking from experience, Pik is a viable solution if you want to run both versions of Ruby on the same Windows box (at least until RVM 2 is released with Windows support). It should only require adding the Ruby from the RailsInstaller installation to Pik so that it is aware. Then, you should be able to use Pik and install other versions of Ruby.
The other option that is a bit more complicated is using Cygwin. This will actually allow you to install RVM and run it in a sandboxed Unix environment on Windows. It's something that I've been meaning to write up how to do but just haven't gotten around to it.
Cheers,
Evan
I used railstutorial.org to install the latest version of ruby and the latest version of rails on my machine.
at the end of the installation I checked
ruby -v ==> 1.9.2 (great)
rails -v ==> 3.0.1 (great)
this morning I opened up terminal
ruby -v
ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
rails -v
Rails 1.2.6
what happened?
My advice for people who are installing ruby is to use RVM. It makes managing your ruby versions and gem versions really simple and you can install multiple ruby versions side by side.
You might want to read this post:
http://rubylearning.com/blog/2010/12/20/how-do-i-keep-multiple-ruby-projects-separate/
You can use Cinderalla to the whole ruby/rvm/mysql/redis/git/... stack set up properly. Cinderella installs everything in ~/Developer and fixes up your PATH as well. I had some issues with a corrupt git mirror last time I used Cinderalla though so YMMV.
With many unix variants, you are likely to have multiple versions of Ruby--particularly if you installed Ruby 1.9 and the system already had 1.8 installed. Essentially, the 1.8 version of Ruby has a higher precedence in your PATH than the 1.9 version. The Ruby Gems command keeps the libraries separate between 1.8 and 1.9 so that the platform will be reasonably stable.
To correct the problem, you have to find where ruby 1.9 is installed. Once you do that, you'll need to override your PATH variable. Assuming 1.9 is installed in the path: /opt/ruby-1.9.2, you will need to set your PATH like this:
PATH=/opt/ruby-1.9.2/bin:$PATH
export PATH
To make the path respect what you want every time, add that to your ~/.profile file (create it if necessary). Once the path has been set, it sould be able to find the correct version of Rails again.
I cannot say for certain because I cannot debug you OSX machine from here, however, I had a very similar occurrence. The problem was caused because I had installed ruby and then rails on my machine using sudo or from the root account. Then when I discovered rvm I installed everything in my user account. When I logged off and back in I appeared to lose everything. I was pulling out my hair. I was pissed that I was going to have to reinstall everything again... when I found the magic.
from the command line execute the command:
rvm list
you'll see that your new version of ruby is there. you'll also notice the tokens that indicate that it is just a normal version. It is not current or default. (see it yet)
Now if you run the command:
rvm use 1.9.2 --default
then every time you login/off and restart your machine your user account will default to that version of ruby and all of the gems that you installed against that version.
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