# Rails

**URL:** https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=775

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 776

---

## [Multi-Tier Architecture in Ruby on Rails?](https://www.ruby-forum.com/t/multi-tier-architecture-in-ruby-on-rails/178087)

<div class="topic-metadata">

**Author:** [@suki](https://www.ruby-forum.com/u/suki)\
**Replies:** 5\
**Last updated:** [October 29, 2009, 9:50am UTC](https://www.ruby-forum.com/t/multi-tier-architecture-in-ruby-on-rails/178087 "2009-10-29T09:50:38Z")

</div>

Hi there, I am pretty new in Ruby on Rails world. Current, I am working with a single tier ROR application. Came from J2EE world, just wonder how Multi-Tier Architecture works in ROR world? Can anyone share your expe…

---

## [Could someone tell me if the query is secure](https://www.ruby-forum.com/t/could-someone-tell-me-if-the-query-is-secure/178105)

<div class="topic-metadata">

**Author:** [@mitch\_newbie](https://www.ruby-forum.com/u/mitch_newbie)\
**Replies:** 3\
**Last updated:** [October 29, 2009, 9:43am UTC](https://www.ruby-forum.com/t/could-someone-tell-me-if-the-query-is-secure/178105 "2009-10-29T09:43:00Z")

</div>

I understand that its easy for someone to do all kinds of nasty things to a database. I am trying to work on security. Could someone tell me if the following query is structured correctly for security #find matching …

---

## [:lib in config.gem](https://www.ruby-forum.com/t/lib-in-config-gem/177082)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 4\
**Last updated:** [October 29, 2009, 8:37am UTC](https://www.ruby-forum.com/t/lib-in-config-gem/177082 "2009-10-29T08:37:06Z")

</div>

Hi – I’m confused what :lib in config.gem(). When do I need it to specify? What should I specify? I know that I need to put the name of the library, but the name is always the same with the gem name? Also do I need t…

---

## [Ruby On Rails Tutorial for Mac?](https://www.ruby-forum.com/t/ruby-on-rails-tutorial-for-mac/178013)

<div class="topic-metadata">

**Author:** [@goodfriend](https://www.ruby-forum.com/u/goodfriend)\
**Replies:** 19\
**Last updated:** [October 29, 2009, 8:29am UTC](https://www.ruby-forum.com/t/ruby-on-rails-tutorial-for-mac/178013 "2009-10-29T08:29:17Z")

</div>

Hi, I’m trying to learn how to use Rails on a Mac. Can anyone possibly point me to a free online tutorial that walks me through all the steps of installation and setup of each and every relevant technology, includin…

---

## [How to send a html email with attachment](https://www.ruby-forum.com/t/how-to-send-a-html-email-with-attachment/178027)

<div class="topic-metadata">

**Author:** [@terrytie](https://www.ruby-forum.com/u/terrytie)\
**Replies:** 2\
**Last updated:** [October 29, 2009, 8:07am UTC](https://www.ruby-forum.com/t/how-to-send-a-html-email-with-attachment/178027 "2009-10-29T08:07:37Z")

</div>

Hi guys: I wanna send a html format email with a attachment. What I do is like: model: def weekly\_report address = WeeklyReportEmail.find\_all\_by\_validate(true).collect(&:address).to\_sentence(:last\_word\_connector =\>…

---

## [Register Error](https://www.ruby-forum.com/t/register-error/177491)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [October 29, 2009, 5:10am UTC](https://www.ruby-forum.com/t/register-error/177491 "2009-10-29T05:10:17Z")

</div>

I just the Authlogic example working and I went to Register myself to create a user. When I did I got this error. 2 errors prohibited this user from being saved There were problems with the following fields: Email i…

---

## [Authlogic Page View Authentication Help](https://www.ruby-forum.com/t/authlogic-page-view-authentication-help/178084)

<div class="topic-metadata">

**Author:** [@about2flip](https://www.ruby-forum.com/u/about2flip)\
**Replies:** 1\
**Last updated:** [October 29, 2009, 3:30am UTC](https://www.ruby-forum.com/t/authlogic-page-view-authentication-help/178084 "2009-10-29T03:30:46Z")

</div>

Hi: I am a newbie at ROR, and I am grasping my head around Authlogic. I am having hard time trying to figure out how can I do the following: in my application controller I have the following helpers: filter\_parameter…

---

## [Automatically recieve mail](https://www.ruby-forum.com/t/automatically-recieve-mail/178100)

<div class="topic-metadata">

**Author:** [@ahmet](https://www.ruby-forum.com/u/ahmet)\
**Replies:** 0\
**Last updated:** [October 29, 2009, 2:46am UTC](https://www.ruby-forum.com/t/automatically-recieve-mail/178100 "2009-10-29T02:46:38Z")

</div>

Hi! I want to make mobile phone registration system with e-mail confirmation. firstly, When user send the e-mail from the cell phone then user will recieve an register url by e-mail. It likes an error handling syst…

---

## [Database query and loops](https://www.ruby-forum.com/t/database-query-and-loops/178096)

<div class="topic-metadata">

**Author:** [@biqut2](https://www.ruby-forum.com/u/biqut2)\
**Replies:** 2\
**Last updated:** [October 29, 2009, 1:44am UTC](https://www.ruby-forum.com/t/database-query-and-loops/178096 "2009-10-29T01:44:15Z")

</div>

Quick question, for example if you have in your controller: @users = User.all for user in @users blah blah blah end what is the best and most strait forward method to find out if you have reached the last user in @u…

---

## [Rate a user with acts\_as\_rated](https://www.ruby-forum.com/t/rate-a-user-with-acts-as-rated/178089)

<div class="topic-metadata">

**Author:** [@td919](https://www.ruby-forum.com/u/td919)\
**Replies:** 0\
**Last updated:** [October 28, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/rate-a-user-with-acts-as-rated/178089 "2009-10-28T23:12:23Z")

</div>

Hi Folks, I am trying to rate a user in User model with acts\_as\_rated… It seems like it’s not possible even when I use :no\_rater option… Has anyone done it before? Do you know a workaround? If you have or know, plea…

---

## [What should I do testing for an old application?](https://www.ruby-forum.com/t/what-should-i-do-testing-for-an-old-application/178067)

<div class="topic-metadata">

**Author:** [@suki](https://www.ruby-forum.com/u/suki)\
**Replies:** 2\
**Last updated:** [October 28, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/what-should-i-do-testing-for-an-old-application/178067 "2009-10-28T23:10:19Z")

</div>

I got this Ruby on Rails application with incomplete testing, (many controllers or views do not have unit test at all). Should I go back to write all unit test for each of controller or view, then do integration test?…

---

## [Problem with Scrubyt](https://www.ruby-forum.com/t/problem-with-scrubyt/178085)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 0\
**Last updated:** [October 28, 2009, 11:07pm UTC](https://www.ruby-forum.com/t/problem-with-scrubyt/178085 "2009-10-28T23:07:56Z")

</div>

Hey, I’m trying to work with Scrubyt using one of the examples: #simple google example require ‘rubygems’ require ‘scrubyt’ @data = Scrubyt::Extractor.define do fetch ‘http://www.google.com/’ fill\_textfield ‘q’, ‘…

---

## [Render :file cached?](https://www.ruby-forum.com/t/render-file-cached/178069)

<div class="topic-metadata">

**Author:** [@tnyplz](https://www.ruby-forum.com/u/tnyplz)\
**Replies:** 2\
**Last updated:** [October 28, 2009, 9:56pm UTC](https://www.ruby-forum.com/t/render-file-cached/178069 "2009-10-28T21:56:33Z")

</div>

In my application I have a controller/view that displays the contents of an audit log file def audit\_log render :layout =\> ‘table’, :file =\> AUDIT\_LOG end The audit log is updated frequently but the render call doe…

---

## [Multiple rails app with passenger on Debian](https://www.ruby-forum.com/t/multiple-rails-app-with-passenger-on-debian/178003)

<div class="topic-metadata">

**Author:** [@kitty00](https://www.ruby-forum.com/u/kitty00)\
**Replies:** 13\
**Last updated:** [October 28, 2009, 9:12pm UTC](https://www.ruby-forum.com/t/multiple-rails-app-with-passenger-on-debian/178003 "2009-10-28T21:12:04Z")

</div>

I have been trying to setup the passenger so that I can run multiple rails app on it without success. I found someone suggested following: Edit your virtual host file (example: /etc/apache2/sites-available/ example) …

---

## [Mislav-will\_paginate(will\_paginate)](https://www.ruby-forum.com/t/mislav-will-paginate-will-paginate/178071)

<div class="topic-metadata">

**Author:** [@duke](https://www.ruby-forum.com/u/duke)\
**Replies:** 2\
**Last updated:** [October 28, 2009, 8:58pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-will-paginate/178071 "2009-10-28T20:58:49Z")

</div>

mislav-will\_paginate(will\_paginate) doesn’t work after search. servers\_controller.rb def index @servers = Server.paginate(:page =\> params\[:page\], :per\_page =\> 20, :order =\> ‘device\_id ASC’) respond\_to do |format| f…

---

## [Confused by group\_by](https://www.ruby-forum.com/t/confused-by-group-by/178066)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [October 28, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/confused-by-group-by/178066 "2009-10-28T18:31:06Z")

</div>

I just started using rails and am trying to learn fast but I am confused with what I have read about using group\_by and could use some help please. I have two tables - students and evaluations students has many evalu…

---

## [Update a plugin](https://www.ruby-forum.com/t/update-a-plugin/177996)

<div class="topic-metadata">

**Author:** [@snlsn](https://www.ruby-forum.com/u/snlsn)\
**Replies:** 4\
**Last updated:** [October 28, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/update-a-plugin/177996 "2009-10-28T18:00:39Z")

</div>

Hello; I installed (I guess that’s the right term) a plugin in my project using script/plugin install \[github url\] I understand the author has made some updates to his plugin. How does one replace old code with the …

---

## [Where is rails? (debian 5.0.3)](https://www.ruby-forum.com/t/where-is-rails-debian-5-0-3/178055)

<div class="topic-metadata">

**Author:** [@steux](https://www.ruby-forum.com/u/steux)\
**Replies:** 2\
**Last updated:** [October 28, 2009, 5:34pm UTC](https://www.ruby-forum.com/t/where-is-rails-debian-5-0-3/178055 "2009-10-28T17:34:31Z")

</div>

I’m using Debian 5.0.3 . Installed ruby1.8 + rubygems1.8 through aptitude. Then executed gem install rails, no error messages. But rails executable isn’t there. What is happenning? regards

---

## [Page caching and world writable directories](https://www.ruby-forum.com/t/page-caching-and-world-writable-directories/178059)

<div class="topic-metadata">

**Author:** [@clarices](https://www.ruby-forum.com/u/clarices)\
**Replies:** 0\
**Last updated:** [October 28, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/page-caching-and-world-writable-directories/178059 "2009-10-28T16:56:21Z")

</div>

I turned on page caching for the index and show actions in a controller named “posts” in a blogging application. The caching path is set to tmp/cache As the pages get cached, the “/posts” directory created to hold the …

---

## [Specific routing problem](https://www.ruby-forum.com/t/specific-routing-problem/178054)

<div class="topic-metadata">

**Author:** [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Replies:** 0\
**Last updated:** [October 28, 2009, 4:28pm UTC](https://www.ruby-forum.com/t/specific-routing-problem/178054 "2009-10-28T16:28:22Z")

</div>

I am implementing a system for users to easily create a small shop for themselves. And I’ve run into a route problem. NOTE: I’ve removed a lot from my route.rb file, since I want focus on this particular problem. …

---

## [GeoKit and Using :through associations](https://www.ruby-forum.com/t/geokit-and-using-through-associations/178053)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 0\
**Last updated:** [October 28, 2009, 4:20pm UTC](https://www.ruby-forum.com/t/geokit-and-using-through-associations/178053 "2009-10-28T16:20:14Z")

</div>

Hi, I am using Geokit, but I can’t seem to properly limit the number of rows returned by GeoKit when I do something like this: Thing.find(:all, :origin =\> \[@home\_city.lat, @home\_city.lng\], :within =\> 10, :limit =\> 2…

---

## [Using Cucumber with Lockdown](https://www.ruby-forum.com/t/using-cucumber-with-lockdown/178040)

<div class="topic-metadata">

**Author:** [@djanowski](https://www.ruby-forum.com/u/djanowski)\
**Replies:** 1\
**Last updated:** [October 28, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/using-cucumber-with-lockdown/178040 "2009-10-28T16:15:31Z")

</div>

Has anyone had any issues using Cucumber with Lockdown. in the following scenario, I am logged in as an admin and so should have :all access rights, however I get the following error. Authoriztion filed! prms: {“acti…

---

## [Activerecord has\_many vs. has\_one scope](https://www.ruby-forum.com/t/activerecord-has-many-vs-has-one-scope/178004)

<div class="topic-metadata">

**Author:** [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Replies:** 3\
**Last updated:** [October 28, 2009, 3:28pm UTC](https://www.ruby-forum.com/t/activerecord-has-many-vs-has-one-scope/178004 "2009-10-28T15:28:59Z")

</div>

Hi All, in the api for has\_many, under the :conditions option we see : Specify the conditions that the associated objects must meet in order to be included as a WHERE SQL fragment, such as price \> 5 AND name LIKE â…

---

## [Rendering OUTSIDE request](https://www.ruby-forum.com/t/rendering-outside-request/178039)

<div class="topic-metadata">

**Author:** [@fero](https://www.ruby-forum.com/u/fero)\
**Replies:** 4\
**Last updated:** [October 28, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/rendering-outside-request/178039 "2009-10-28T15:23:06Z")

</div>

Hello, I need to render erb template WITH LAYOUT OUTSIDE REQUEST, for example to generate document in background process. How can I do this? I know that I can do ActionView::Base.new … but its possible to have also l…

---

## [How to start server for site with no /script/server/ script?](https://www.ruby-forum.com/t/how-to-start-server-for-site-with-no-script-server-script/178008)

<div class="topic-metadata">

**Author:** [@bch36](https://www.ruby-forum.com/u/bch36)\
**Replies:** 3\
**Last updated:** [October 28, 2009, 2:15pm UTC](https://www.ruby-forum.com/t/how-to-start-server-for-site-with-no-script-server-script/178008 "2009-10-28T14:15:47Z")

</div>

I’m a newbie to Rails and can’t get a site working that doesn’t have a /script/server scripts. I setup Ruby on Rails to run on Fedora and created a new website (“myfirstrails”). When I run “./script/server -d” from wi…

---

## [Rspec - In views](https://www.ruby-forum.com/t/rspec-in-views/178025)

<div class="topic-metadata">

**Author:** [@Rails\_ROR](https://www.ruby-forum.com/u/Rails_ROR)\
**Replies:** 5\
**Last updated:** [October 28, 2009, 2:12pm UTC](https://www.ruby-forum.com/t/rspec-in-views/178025 "2009-10-28T14:12:16Z")

</div>

Hi All, I want to test my application with rspec. In order to test my views, I have written few specs as given in the examples. Is there any way to test the user acceptance? i.e suppose the field takes a string. I …

---

## [Undefined method \`^' for "e":String](https://www.ruby-forum.com/t/undefined-method-for-e-string/178016)

<div class="topic-metadata">

**Author:** [@jhosteny](https://www.ruby-forum.com/u/jhosteny)\
**Replies:** 6\
**Last updated:** [October 28, 2009, 2:07pm UTC](https://www.ruby-forum.com/t/undefined-method-for-e-string/178016 "2009-10-28T14:07:25Z")

</div>

I’m attempting to learn Ruby on Rails, but these errors aren’t helping. I’m currently trying to follow the lessons available on www.learningrails.com. I received this error after trying to visit a page generated by u…

---

## [Re-tasking destroy contoller action...is this bad practice?](https://www.ruby-forum.com/t/re-tasking-destroy-contoller-action-is-this-bad-practice/178002)

<div class="topic-metadata">

**Author:** [@coolmenu](https://www.ruby-forum.com/u/coolmenu)\
**Replies:** 5\
**Last updated:** [October 28, 2009, 1:47pm UTC](https://www.ruby-forum.com/t/re-tasking-destroy-contoller-action-is-this-bad-practice/178002 "2009-10-28T13:47:24Z")

</div>

I’m trying to get some opinions on a design I’m floating (“rails way” or not?). Say I’ve got an Author model in my Blog application and I want my administrators to be able to disable authors. I don’t want to delete …

---

## [Basic Authentication within a POST-request using HTTPClient](https://www.ruby-forum.com/t/basic-authentication-within-a-post-request-using-httpclient/178037)

<div class="topic-metadata">

**Author:** [@onomato](https://www.ruby-forum.com/u/onomato)\
**Replies:** 0\
**Last updated:** [October 28, 2009, 12:24pm UTC](https://www.ruby-forum.com/t/basic-authentication-within-a-post-request-using-httpclient/178037 "2009-10-28T12:24:32Z")

</div>

Hey, I want to call a service with HTTPpost behind a BasicAuth using HTTPClient like this: client = HTTPClient.new body = { … } client.set\_auth(domain, user, password) client.post (domain, body) Receive a 401! If…

---

## [MySQL sometime fail to record timestamps, become NULL](https://www.ruby-forum.com/t/mysql-sometime-fail-to-record-timestamps-become-null/178019)

<div class="topic-metadata">

**Author:** [@k560](https://www.ruby-forum.com/u/k560)\
**Replies:** 2\
**Last updated:** [October 28, 2009, 11:48am UTC](https://www.ruby-forum.com/t/mysql-sometime-fail-to-record-timestamps-become-null/178019 "2009-10-28T11:48:15Z")

</div>

My Rails apps using MySQL and sometime timestamps, created\_at and updated\_at, become NULL. Why it fails to record? Does anyone know about this?

[Previous page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=774)

[Next page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=776)
