Bug 980045 - When following TorqueBox Quickstart Guide the Rails 4 is automatically installed
When following TorqueBox Quickstart Guide the Rails 4 is automatically installed
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: doc-TorqueBox-Quickstart-Guide (Show other bugs)
2.3.0
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Petr Penicka
Tomas Repel
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-01 06:01 EDT by Tomas Repel
Modified: 2014-01-13 03:40 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-16 07:33:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Repel 2013-07-01 06:01:04 EDT
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 08:58:26 EDT
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 12:22:21 EDT
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 13:14:12 EDT
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 04:37:19 EDT
Verified in WFK 2.3.0.CR2.

Note You need to log in before you can comment on or make changes to this bug.