Bug 980045

Summary: When following TorqueBox Quickstart Guide the Rails 4 is automatically installed
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Tomas Repel <trepel>
Component: doc-TorqueBox-Quickstart-GuideAssignee: Petr Penicka <ppenicka>
Status: CLOSED CURRENTRELEASE QA Contact: Tomas Repel <trepel>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.3.0CC: bbrownin, maschmid, ppenicka
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-16 11:33:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Repel 2013-07-01 10:01:04 UTC
Document URL: 

http://documentation-devel.engineering.redhat.com/docs/en-US/Red_Hat_JBoss_Web_Framework_Kit/2.3/html/TorqueBox_Quickstart_Guide/first-steps.html#first-steps-mac-linux

Section Number and Name: 

Procedure 1.2. Your First Rails Application

Describe the issue: 

When executing `gem install rails`, the Rails 4 is automatically installed now.

Suggestions for improvement: 

I believe TorqueBox is meant to run with Rails 3, there should be description how to force to install Rails 3.

Comment 1 Ben Browning 2013-07-01 12:58:26 UTC
The recently released Rails 4 did break our quickstart guide, since Rails 4 and JRuby don't work together out of the box just yet. We should modify the `gem install rails` command to be `gem install rails -v "~> 3.2"` to force the latest Rails 3.2.x to be installed instead of picking up Rails 4.

Comment 2 Tomas Repel 2013-07-01 16:22:21 UTC
I have tried the solution proposed in comment 1, it works. Many thanks Ben.

This solution requires some additional modifications:

Procedure 1.2. Your First Rails Application

replace `gem install rails` by `gem install rails -v "~> 3.2"`

replace lines:
Successfully installed rails-3.2.8
27 gems installed
by:
Successfully installed rails-3.2.13
29 gems installed

replace lines:
Using rails (3.2.8) 
Installing sass (3.2.1) 
Installing sass-rails (3.2.5) 
Installing therubyrhino_jar (1.7.4) 
Installing therubyrhino (2.0.1) 
Installing uglifier (1.3.0) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
by:
Using rails (3.2.13) 
Installing sass (3.2.9) 
Installing sass-rails (3.2.6) 
Installing therubyrhino_jar (1.7.4) 
Installing therubyrhino (2.0.2) 
Installing uglifier (2.1.1) 
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

Procedure 1.3. Subsequent Applications

replace lines:
Fetching: rack-1.4.1.gem (100%)
Successfully installed rack-1.4.1
by:
Fetching: rack-1.5.2.gem (100%)
Successfully installed rack-1.5.2

Procedure 1.5. You First Rails Application
 - here the very similar modifications as for Procedure 1.2 have to be applied

Procedure 1.6. Subsequent Applications
 - very similar modifications as for Procedure 1.3 have to be applied

2.1. TorqueBox Rails Template
Example 2.1. Example Gemfile with the TorqueBox Gem
 - replace `gem 'rails', '3.2.8'` by `gem 'rails', '3.2.13'`

Comment 3 Petr Penicka 2013-07-02 17:14:12 UTC
Fixed all version numbers throughout the guide.

Docs stage URL: https://documentation-devel.engineering.redhat.com/docs/en-US/Red_Hat_JBoss_Web_Framework_Kit/2.3/html-single/TorqueBox_Quickstart_Guide/index.html

Comment 4 Tomas Repel 2013-07-03 08:37:19 UTC
Verified in WFK 2.3.0.CR2.