# Anybody working through "Beginning Ruby on Rails E-Commerce"

**URL:** <https://www.ruby-forum.com/t/anybody-working-through-beginning-ruby-on-rails-e-commerce/103929>\
**Category:** Rails\
**Created:** [May 11, 2007, 7:07pm UTC](https://www.ruby-forum.com/t/anybody-working-through-beginning-ruby-on-rails-e-commerce/103929 "2007-05-11T19:07:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevepoll](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3d9bf3/32.png) [@stevepoll](https://www.ruby-forum.com/u/stevepoll)\
**Post date:** [May 11, 2007, 7:07pm UTC](https://www.ruby-forum.com/t/anybody-working-through-beginning-ruby-on-rails-e-commerce/103929/1 "2007-05-11T19:07:58Z")

</div>

Hi. I’m an experienced Java developer making the jump to Rails, so  
please forgive the newbieness of this post. I picked up two books  
initially: the “Agile” book by Dave T. and the “E-Commerce” book  
by Hellsten and Laine. I’m trying to work my way through the  
“Emporium” sample application in the latter book, and it’s been a bit  
of a frustrating exercise. There’s an errata page on the publisher’s  
website that helps to mitigate some of the issues I’ve had with  
mistakes in the book, but right now I’m faced with an issue that I’m  
not able to resolve and there is no mention of it in the errata.

At issue is the following code…  
class UserNotifier \< ActionMailer::Base  
@@session = ActionController::Integration::Session.new  
…  
@body[:url] = @@session.url\_for(…)

The code describes the code above as “trickery” (page 240), since the  
url\_for method is normally not available inside mailers, as it is an  
instance method for ActionController controllers. Ok, so far so good.  
The problem is that when I try to test the app, I get the following  
error, along with a small stack trace:

uninitialized constant ActionController::Integration  
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active\_support/  
dependencies.rb:263:in `load_missing_constant' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:452:in`const\_missing’  
#{RAILS\_ROOT}/app/models/user\_notifier.rb:2  
#{RAILS\_ROOT}/app/models/user\_observer.rb:3:in `after_save' #{RAILS_ROOT}/app/controllers/account_controller.rb:49:in`forgot\_password’

One thing that I thought was that the authors were coding to Rails  
1.1, while I have 1.2 on my system. As a result of this I have seen  
several deprecation warnings throughout the course of my studying the  
example app. Is this simply a case of something that was allowed in  
1.1 but is a no-no now? Or is there something else that I am missing.  
Any help would be appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![stevepoll](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3d9bf3/32.png) [@stevepoll](https://www.ruby-forum.com/u/stevepoll)\
**Post date:** [May 11, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/anybody-working-through-beginning-ruby-on-rails-e-commerce/103929/2 "2007-05-11T21:22:18Z")

</div>

> One thing that I thought was that the authors were coding to Rails  
> 1.1, while I have 1.2 on my system. As a result of this I have seen  
> several deprecation warnings throughout the course of my studying the  
> example app. Is this simply a case of something that was allowed in  
> 1.1 but is a no-no now? Or is there something else that I am missing.

If you add this:

require ‘action\_controller/integration’

to the top of /app/model/s/user\_notifier.rb and restart your server,  
this error should go away.

I’m not clear what changed from 1.1.x to 1.2.x that makes this a  
problem, but empirically this is what fixes things.

Overall, I think this is a great book…wish they’d update it for RoR  
1.2.x…
