rails update 3.2.5 - ruby

for our redmine-installation (=>tool for project planing, ticketing etc.)
we installed ruby on our server, which worked fine ...
But now we need a rails update (Rails 3.2.3) for a redmine update and
so the troubles began:
I did the following:
1.) installing ruby 1.9.3
root#information:~# rvm install 1.9.3
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #fetching
ruby-1.9.3-p194 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #configuring
ruby-1.9.3-p194 - #compiling
ruby-1.9.3-p194 - #installing
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.3-p194 ...
Installation of rubygems completed successfully.
ruby-1.9.3-p194 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p194 - #importing default gemsets (/usr/local/rvm/gemsets/)
Install of ruby-1.9.3-p194 - #complete
root#information:~# ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
root#information:~#
root#information:/var/www/redmine# rvm docs generate
Currently 'rvm docs ...' does not work with non-rvm rubies.
root#information:/var/www/redmine#
2.) updating gem
root#information:/var/www/redmine# gem update
Updating installed gems
Updating actionmailer
Successfully installed i18n-0.6.0
Successfully installed multi_json-1.3.6
Successfully installed activesupport-3.2.5
Successfully installed builder-3.0.0
Successfully installed activemodel-3.2.5
Successfully installed rack-1.4.1
Successfully installed rack-cache-1.2
Successfully installed rack-test-0.6.1
Successfully installed journey-1.0.3
Successfully installed hike-1.2.1
Successfully installed tilt-1.3.3
Successfully installed sprockets-2.1.3
Successfully installed erubis-2.7.0
Successfully installed actionpack-3.2.5
Successfully installed mime-types-1.18
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.10
Successfully installed mail-2.4.4
Successfully installed actionmailer-3.2.5
Updating activerecord
Successfully installed arel-3.0.2
Successfully installed activerecord-3.2.5
Updating activeresource
Successfully installed activeresource-3.2.5
Updating bundler
Successfully installed bundler-1.1.4
Updating fastercsv
Successfully installed fastercsv-1.5.5
Updating rails
Building native extensions. This could take a while...
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Successfully installed rack-ssl-1.3.2
Successfully installed thor-0.15.2
Successfully installed json-1.7.3
Successfully installed rdoc-3.12
Successfully installed railties-3.2.5
Successfully installed rails-3.2.5
Gems updated: i18n, multi_json, activesupport, builder, activemodel, rack, rack-cache, rack-test, journey, hike, tilt, sprockets, erubis, actionpack, mime-types, polyglot, treetop, mail, actionmailer, arel, activerecord, activeresource, bundler, fastercsv, rack-ssl, thor, json, rdoc, railties, rails
root#information:/var/www/redmine#
3.) trying to update rails
root#information:/var/www/redmine# gem install rails --version '~> 3.2.0'
Successfully installed rails-3.2.5
1 gem installed
Installing ri documentation for rails-3.2.5...
Installing RDoc documentation for rails-3.2.5...
root#information:/var/www/redmine# rails -v
Rails 2.3.5
root#information:/var/www/redmine#
My problem is, that redmine 2.0.1 had problems with ruby 1.9.3
and so tried to downgrade ruby by e.g. "rvm uninstall 1.9.3" and tried
to reinstall ruby 1.8.6...
After all I just upgraded to ruby 1.9.3 but failed to upgrade to rails 3.2.5....
Can you help me here ?
I'm new to ruby. Did I forget installation steps?.
Thanks in advance for your help?
Cheers,
Ansgar

Ruby upgrades will not, in general, disturb your database. So, first step is to backup your database. Rails upgrades will often disturb your database once you have a clean install, since often you will have to do a "rake db:migrate" at the end.
There are a number of steps to upgrading the complete stack:ruby, rails, then redmine. You will need to read this document, which will guide you step by step through the upgrade:
http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

Related

How to install Ruby ri documentation for Ruby v2.1.7

Can somebody point me to how I can install the ri documentation for v2.1.7?
I tried "How do I install the Ruby ri documentation?" with no luck.
I would prefer installing ri so that I can lookup specific methods in a class directly without opening the help file.
Also, I had no luck with the following:
C:\Users\ram\ruby>gem install rdoc-data
Fetching: rdoc-data-4.0.1.gem (100%)
rdoc-data is only required for C ruby 1.8.7 or 1.9.1.
rdoc-data is required for JRuby.
To install ri data for RDoc 4.0+ run:
rdoc-data --install
Successfully installed rdoc-data-4.0.1
Parsing documentation for rdoc-data-4.0.1
Installing ri documentation for rdoc-data-4.0.1
Done installing documentation for rdoc-data after 1 seconds
1 gem installed
C:\Users\ram\ruby>ri Array
Nothing known about Array
C:\Users\ram\ruby>rdoc-data --install
Your ruby version 2.1.7 is not supported, only 1.8.7, 1.9.2, 1.9.3, 2.0.0
It seems that for v2.1.7 something else is required.
Note this is for Windows. I want to do it natively without using VM/Cygwin, etc.
As your error message indicates, rdoc-data doesn't support ruby 2.1.7.
If you're using RVM, try:
rvm docs generate
Be patient, it takes several minutes to install the documentation.
If you want the ri documentation installed by default for all gem installations, check your gem config file ~/.gemrc to see if you have defaults set up that excludes documentation. Remove any and all of the following:
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
install: --no-document
update: --no-document
gem: --no-document
I believe gems install documentation by default. If not, add this to the gem config file
gem: --ri
Since you're on Windows, you can install Cygwin on your Windows machine and then install RVM using Cygwin. Or, you can download the rdocs source files http://ruby-doc.org/downloads/ and extract them to your Ruby docs folder /Users/userprofile/.rvm/gems/ruby-2.1.7/doc/.
I did a cursory glance, and didn't see ruby 2.1.7; it goes straight from 2.1.6 to 2.2.0. You can dump 2.1.6 in the ruby-2.1.7/doc/ folder or update your Ruby version to one that is supported.

Ruby issue when installing Umpire on Ubuntu 12.04

I am currently trying to get https://github.com/heroku/umpire working locally on my Ubuntu machine with graphite.
I have done the following steps on version 12.04 of Ubuntu:
git clone https://github.com/heroku/umpire
cd umpire
sudo apt-get install ruby-rvm
sudo rvm install ruby-1.9.2-p180
sudo apt-get install ruby-bundler
The line that is producing the error in the Gemfile:
gem 'rack-timeout', git: "https://github.com/freeformz/rack-timeout.git"
This is the error that I am getting in the terminal:
/home/vagrant/umpire/Gemfile:9:in `evaluate': compile error (SyntaxError)
/home/vagrant/umpire/Gemfile:9: syntax error, unexpected ':', expecting $end
gem 'rack-timeout', git: "https://github.com/freeformz...
^
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:17:in `build'
from /usr/lib/ruby/vendor_ruby/bundler.rb:136:in `definition'
I've been trying to fix this for a while but I am not particularly familiar with Ruby. Does anyone know how fix this?
Thank you in advance for any help.
I would not use the apt provided rvm. It's old and broken in a few ways AFAICT.
Start here: Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v
Once I did that I was able to install the right version of ruby for my user and bundle install...
vagrant#ubuntu-12:~$ cd umpire/
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /home/vagrant/umpire/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
ruby-1.9.3-p547 is not installed.
To install do: 'rvm install ruby-1.9.3-p547'
vagrant#ubuntu-12:~/umpire$ rvm install ruby-1.9.3-p547
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-1.9.3-p547.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-1.9.3-p547 - #configure
ruby-1.9.3-p547 - #download
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 11.3M 100 11.3M 0 0 1851k 0 0:00:06 0:00:06 --:--:-- 2137k
ruby-1.9.3-p547 - #validate archive
ruby-1.9.3-p547 - #extract
ruby-1.9.3-p547 - #validate binary
ruby-1.9.3-p547 - #setup
ruby-1.9.3-p547 - #gemset created /home/vagrant/.rvm/gems/ruby-1.9.3-p547#global
ruby-1.9.3-p547 - #importing gemset /home/vagrant/.rvm/gemsets/global.gems....................................
ruby-1.9.3-p547 - #generating global wrappers........
ruby-1.9.3-p547 - #gemset created /home/vagrant/.rvm/gems/ruby-1.9.3-p547
ruby-1.9.3-p547 - #importing gemsetfile /home/vagrant/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-1.9.3-p547 - #generating default wrappers........
vagrant#ubuntu-12:~/umpire$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching https://github.com/freeformz/rack-timeout.git
Installing rake 10.1.1
Installing addressable 2.3.5
Installing aggregate 0.2.2
Installing safe_yaml 0.9.7
Installing crack 0.4.1
Installing diff-lcs 1.2.5
Installing excon 0.31.0
Installing multipart-post 1.2.0
Installing faraday 0.8.9
Installing multi_json 1.8.4
Installing librato-metrics 1.3.0
Installing rack 1.5.2
Installing puma 2.7.1
Installing rack-protection 1.5.1
Installing rack-ssl 1.3.3
Installing rack-test 0.6.2
Using rack-timeout 0.1.0beta2 from https://github.com/freeformz/rack-timeout.git (at master)
Installing rspec-core 2.14.7
Installing rspec-expectations 2.14.4
Installing rspec-mocks 2.14.4
Installing rspec 2.14.1
Installing scrolls 0.3.3
Installing tilt 1.4.1
Installing sinatra 1.4.4
Installing webmock 1.16.1
Installing yajl-ruby 1.2.0
Using bundler 1.6.2
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
vagrant#ubuntu-12:~/umpire$

bundler does not install gem in current rvm gemset if gem is from remote repository

I have selected a gemset with
rvm use ruby-2.1.2#deploy
in my gemfile I have:
gem 'transip', :git => 'git://github.com/rempargo/transip.git'
then I run bundle install and get the following output:
....
....
Installing wasabi 3.3.0
Installing savon 2.5.1
Using transip 0.4.2 from git://github.com/rempargo/transip.git (at master)
Using bundler 1.6.2
Your bundle is updated!
But when I do gem list all gems except the transip one are listed.
The other gems are not installed in gemset 'ruby-2.1.2' or 'ruby-2.1.2#global', but are really installed in the gemset ruby-2.1.2#deploy
I tried also to use bundle exec install although I never used the 'exec' before, but it does not work.
Is there a problem using bundler and rvm when using gems that uses a link to a repository?
I'm using:
Mac OS X 10.9.3 (With command-line tools installed)
rvm 1.25.26
bundler 1,6,2
P.S. This all happened after upgrading to Maverick, when some libraries where not working anymore, and I had to install ruby again with rvm.
gem list will show all the gems installed on your system
bundle show gem_namewill give you whether that gem is installed in your current application bundled gemset

Error installing ruby-debug/ruby-debug-base with Ruby Enterprise v1.8.7

I got problems when trying to install gem ruby-debug-ide. Then, I try to install gem ruby-debug-base first. However, I got an error:
Error installing ruby-debug-base:
rb-threadframe requires Ruby version ~> 1.9.2frame.
The same error occured when installing ruby-debug.
I'm using Ubuntu v10.4, Ruby Enterprise v1.8.7, Rubygems v1.8.15.
Thanks for your help!
The problem is in new version (0.0.6) of rbx-require-relative that requires rb-threadframe >= 0
Try this:
gem install rbx-require-relative -v 0.0.5
gem install linecache ruby-debug-base --ignore-dependencies
Seems pretty self explanatory.
You need a Ruby version greater than 1.9.2 and you have v1.8.7, will need to get a newer version.

not able to update ruby (and also not able to install gems)

I am new to ruby.
OS: Windows XP
Ruby Version --ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
When I run
gem update --system after installing ruby
I am getting this error
C:\Documents and Settings\abhisheksreepal>gem update --system
Updating RubyGems
Updating rubygems-update
ERROR: While executing gem ... (Gem::InstallError)
invalid gem format for C:/Ruby/lib/ruby/gems/1.8/cache/rubygems-update-1.3.5.gem
I think it might be a corrupted download - Gems has downloaded a bad copy of the rubygems-update package into the cache, and every time that you run the update function it tries to use that cached copy.
Try deleting C:/Ruby/lib/ruby/gems/1.8/cache/rubygems-update-1.3.5.gem and trying again.
If that doesn't work, uninstall the version of Ruby that you are using now, and use the Release Candidate of RubyInstaller. The RubyInstaller supersedes the One-Click Installer, and has a newer version of RubyGems.

Resources