# Rails

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

[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:** 1098

---

## [Restful\_rails with subdomains](https://www.ruby-forum.com/t/restful-rails-with-subdomains/155446)

<div class="topic-metadata">

**Author:** [@Danny\_Collier](https://www.ruby-forum.com/u/Danny_Collier)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/restful-rails-with-subdomains/155446 "2008-12-11T21:08:26Z")

</div>

I’m running multiple subdomains from one Rails application. I would like to extend restful\_rails so that permissions are assigned by site; e.g. a user with administrative permission in one subdomain might have a diffe…

---

## [Routes in a migration?](https://www.ruby-forum.com/t/routes-in-a-migration/155445)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 8:35pm UTC](https://www.ruby-forum.com/t/routes-in-a-migration/155445 "2008-12-11T20:35:53Z")

</div>

So this is a strange request, but I’m writing a large migration inserting a lot of content into my db. Some of the entries have a link to another section of the site in the text column. I’d like to use the routes that…

---

## [Second Ruby and Rails devroom at Fosdem (Brussels, 7 Feb 2009)](https://www.ruby-forum.com/t/second-ruby-and-rails-devroom-at-fosdem-brussels-7-feb-2009/155443)

<div class="topic-metadata">

**Author:** [@Calamitas](https://www.ruby-forum.com/u/Calamitas)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/second-ruby-and-rails-devroom-at-fosdem-brussels-7-feb-2009/155443 "2008-12-11T20:27:42Z")

</div>

Hi folks, After last year’s success, the Belgian Ruby U. Group is happy to announce the second Ruby and Rails devroom at Fosdem 2009. Fosdem is a gathering of Free and Open Source Software developers and the ideal o…

---

## [Very easy, look](https://www.ruby-forum.com/t/very-easy-look/155441)

<div class="topic-metadata">

**Author:** [@gabrielsimas](https://www.ruby-forum.com/u/gabrielsimas)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/very-easy-look/155441 "2008-12-11T20:18:13Z")

</div>

If in Debian-Based type: apt-get install libsqlite3-dev and so: gem install sqlite3-ruby you see this message: Building native extensions. This could take a while… Successfully installed sqlite3-ruby-1.2.4 1 gem …

---

## [Update parent in assocation callback](https://www.ruby-forum.com/t/update-parent-in-assocation-callback/155438)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 7:42pm UTC](https://www.ruby-forum.com/t/update-parent-in-assocation-callback/155438 "2008-12-11T19:42:54Z")

</div>

I’d like to update an attribute on the parent using an association callback. For example class User \< ActiveRecord::Base has\_many :peeps, :after\_add =\> :update\_latest\_peep protected def update\_latest\_peep(peep) se…

---

## [How to select a style based on the controller?](https://www.ruby-forum.com/t/how-to-select-a-style-based-on-the-controller/155439)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 7:33pm UTC](https://www.ruby-forum.com/t/how-to-select-a-style-based-on-the-controller/155439 "2008-12-11T19:33:22Z")

</div>

I know I’ve seen this somewhere before, but my friend Google and I just can’t seem to recall where. I would like to change the style of a link (in my application layout) based upon which controller is currently activ…

---

## [Fleximage and RMagick on Dreamhost](https://www.ruby-forum.com/t/fleximage-and-rmagick-on-dreamhost/155436)

<div class="topic-metadata">

**Author:** [@trivial](https://www.ruby-forum.com/u/trivial)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/fleximage-and-rmagick-on-dreamhost/155436 "2008-12-11T19:23:26Z")

</div>

Hi, I installed Fleximage with RMagick on InstantRails and had it working on my development box. When I moved to the production box on Dreamhost, I started to get the following error when I tried to render images: =…

---

## [Access ActionView::Base in configuration](https://www.ruby-forum.com/t/access-actionview-base-in-configuration/155433)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [December 11, 2008, 7:21pm UTC](https://www.ruby-forum.com/t/access-actionview-base-in-configuration/155433 "2008-12-11T19:21:41Z")

</div>

Why is it impossible to access ActionView::Base in my environment.rb ? getting uninitialized constant error… thanks fyl erwin

---

## [Uninitialized constant ActionVie](https://www.ruby-forum.com/t/uninitialized-constant-actionvie/155414)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [December 11, 2008, 7:17pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-actionvie/155414 "2008-12-11T19:17:08Z")

</div>

Hello I am trying to transform my web app into a 2.2 ready app, in my config/environment.rb I wrote Rails::Initializer.run do |config| … disabling the surrounding div if validation error ActionView::Base.field\_erro…

---

## [Full time, direct hire Ruby/Rails position in Upstate SC](https://www.ruby-forum.com/t/full-time-direct-hire-ruby-rails-position-in-upstate-sc/155428)

<div class="topic-metadata">

**Author:** [@AndyV](https://www.ruby-forum.com/u/AndyV)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 6:21pm UTC](https://www.ruby-forum.com/t/full-time-direct-hire-ruby-rails-position-in-upstate-sc/155428 "2008-12-11T18:21:06Z")

</div>

PCSS, Inc (www.pcssinc.com) is looking to hire at least one new Ruby/ Rails developer. PCSS serves the judicial system, offering jury and case management solutions to help Courts move towards a paperless environment …

---

## [Time zone oddity with Rails 2.2.2 and Ruby 1.8.6 (win32)](https://www.ruby-forum.com/t/time-zone-oddity-with-rails-2-2-2-and-ruby-1-8-6-win32/155424)

<div class="topic-metadata">

**Author:** [@sven](https://www.ruby-forum.com/u/sven)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/time-zone-oddity-with-rails-2-2-2-and-ruby-1-8-6-win32/155424 "2008-12-11T17:36:58Z")

</div>

The rfc822 method and to\_s(:rfc822) are behaving differently. See below: C:\\projects\>rails -v Rails 2.2.2 C:\\projects\>ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) \[i386-mswin32\] C:\\projects\>rails odd create …

---

## [Find\_or\_create\_by\_name](https://www.ruby-forum.com/t/find-or-create-by-name/155421)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 1\
**Last updated:** [December 11, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/find-or-create-by-name/155421 "2008-12-11T17:23:59Z")

</div>

If I have a table: (id, lastname, firstname), can I use “find\_or\_create\_by\_name” if I have to search by first and last name?

---

## [Select count(\*) using Ruby on Rails](https://www.ruby-forum.com/t/select-count-using-ruby-on-rails/155420)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 2\
**Last updated:** [December 11, 2008, 5:15pm UTC](https://www.ruby-forum.com/t/select-count-using-ruby-on-rails/155420 "2008-12-11T17:15:55Z")

</div>

Hullo. Welcome to my question. In my controller I need to get the number of items in a table. If I was just using MySQL, I’d do “select count(\*) from blah where blah blah blah”. What is the way to do this in my cont…

---

## [Can someone explain what is wrong with my syntax?](https://www.ruby-forum.com/t/can-someone-explain-what-is-wrong-with-my-syntax/155416)

<div class="topic-metadata">

**Author:** [@bushymark](https://www.ruby-forum.com/u/bushymark)\
**Replies:** 1\
**Last updated:** [December 11, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/can-someone-explain-what-is-wrong-with-my-syntax/155416 "2008-12-11T17:10:30Z")

</div>

Hey Everyone, I think this should be an easy one, and the solution right now was to use two lines instead of one, but I am curious why this syntax isn’t working. Assignment.find(:all).delete\_if {|assignment| assignme…

---

## [Using "if else" in a helper](https://www.ruby-forum.com/t/using-if-else-in-a-helper/155412)

<div class="topic-metadata">

**Author:** [@atmorell](https://www.ruby-forum.com/u/atmorell)\
**Replies:** 1\
**Last updated:** [December 11, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/using-if-else-in-a-helper/155412 "2008-12-11T16:34:04Z")

</div>

Hello, I am trying to move some logic from my views into a helper. If album with id 123 is found the view displays “found”. If I replace 123 with something that does not exists the page is just blank… Why don’t I ge…

---

## [How to share components between apps](https://www.ruby-forum.com/t/how-to-share-components-between-apps/155356)

<div class="topic-metadata">

**Author:** [@newbee-robert](https://www.ruby-forum.com/u/newbee-robert)\
**Replies:** 1\
**Last updated:** [December 11, 2008, 4:33pm UTC](https://www.ruby-forum.com/t/how-to-share-components-between-apps/155356 "2008-12-11T16:33:28Z")

</div>

I know you’re gonnna say plugins, but bear with me. I’m a Facebook app developer, and I have an array of different ones going. I want them all to work off the same basic framework I’ve created, but I’m not sure what t…

---

## [Searching for a Graphic plugin (gruff like) not using ImageM](https://www.ruby-forum.com/t/searching-for-a-graphic-plugin-gruff-like-not-using-imagem/155411)

<div class="topic-metadata">

**Author:** [@marouen](https://www.ruby-forum.com/u/marouen)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/searching-for-a-graphic-plugin-gruff-like-not-using-imagem/155411 "2008-12-11T16:14:27Z")

</div>

Hi guys, It’s my first post. I’m searching for a graphical plugin like gruff or scruffy because I found problems installing ImageMagick lib on the production server. Also like gruff, the plugin must generate graphic…

---

## [Cache\_sweeper problem deleting cache](https://www.ruby-forum.com/t/cache-sweeper-problem-deleting-cache/155405)

<div class="topic-metadata">

**Author:** [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 3:01pm UTC](https://www.ruby-forum.com/t/cache-sweeper-problem-deleting-cache/155405 "2008-12-11T15:01:40Z")

</div>

i want to caching my rss feed, this work well, but i can t delete the generated cache with cache\_sweeper: my feed rss generated by events archive, the public controller: START CODE class RssController \< ApplicationCon…

---

## [Blanks in date\_select need configurable text](https://www.ruby-forum.com/t/blanks-in-date-select-need-configurable-text/155389)

<div class="topic-metadata">

**Author:** [@Martijn\_Vos](https://www.ruby-forum.com/u/Martijn_Vos)\
**Replies:** 6\
**Last updated:** [December 11, 2008, 2:45pm UTC](https://www.ruby-forum.com/t/blanks-in-date-select-need-configurable-text/155389 "2008-12-11T14:45:52Z")

</div>

I thought I’d mailed this already, but I haven’t seen it show up on the list, so I’m mailing it again. My apologies if it does show up twice now. I want something really simple: I want a date\_select that has blanks (…

---

## [News Roll](https://www.ruby-forum.com/t/news-roll/155367)

<div class="topic-metadata">

**Author:** [@Jaikishan\_J](https://www.ruby-forum.com/u/Jaikishan_J)\
**Replies:** 4\
**Last updated:** [December 11, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/news-roll/155367 "2008-12-11T14:31:47Z")

</div>

Hello, I am making an application in which I have a div where a new news is flashed after every 5 second or so automatically. By automatically, I mean user does not send any request to server by clicking on anything…

---

## [Tips for Data Model](https://www.ruby-forum.com/t/tips-for-data-model/155384)

<div class="topic-metadata">

**Author:** [@gil](https://www.ruby-forum.com/u/gil)\
**Replies:** 1\
**Last updated:** [December 11, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/tips-for-data-model/155384 "2008-12-11T14:15:56Z")

</div>

I can’t quite seem to get the data model down for a fairly simple set of data. The data is: Framework --\> Strand --\> Level --\> Benchmark It would be simple enough if there were only three levels but since there are …

---

## [Application security fun](https://www.ruby-forum.com/t/application-security-fun/155395)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 2\
**Last updated:** [December 11, 2008, 1:19pm UTC](https://www.ruby-forum.com/t/application-security-fun/155395 "2008-12-11T13:19:58Z")

</div>

Hello, I am trying to develop an application that uses STI for People. So you have customer \< person, admin \< person. I have also created a login controller with accompanying simple login page (un & pw fields). Logi…

---

## [Mysq error on XP](https://www.ruby-forum.com/t/mysq-error-on-xp/155392)

<div class="topic-metadata">

**Author:** [@gamafranco](https://www.ruby-forum.com/u/gamafranco)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 12:39pm UTC](https://www.ruby-forum.com/t/mysq-error-on-xp/155392 "2008-12-11T12:39:56Z")

</div>

I keep getting the MySql error message. I’ve tried to re-install the gem and the database but nothing works. I’m no XP. Is there anyone else in the same situation? !!! The bundled mysql.rb driver has been removed fro…

---

## [Attachment\_fu and vCards (2 questions)](https://www.ruby-forum.com/t/attachment-fu-and-vcards-2-questions/106806)

<div class="topic-metadata">

**Author:** [@monjurul](https://www.ruby-forum.com/u/monjurul)\
**Replies:** 1\
**Last updated:** [December 11, 2008, 11:25am UTC](https://www.ruby-forum.com/t/attachment-fu-and-vcards-2-questions/106806 "2008-12-11T11:25:23Z")

</div>

I’ve been having some trouble figuring these two (probably simple) feats. First, is there a way to make attachment\_fu override files a user uploads? I figure one way would be to make all the filenames and paths be t…

---

## [!map:HashWithIndifferentAccess](https://www.ruby-forum.com/t/map-hashwithindifferentaccess/155391)

<div class="topic-metadata">

**Author:** [@rbalaji](https://www.ruby-forum.com/u/rbalaji)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 11:19am UTC](https://www.ruby-forum.com/t/map-hashwithindifferentaccess/155391 "2008-12-11T11:19:31Z")

</div>

Hi Im using list page and dubug the code and i got the error !map:HashWithIndifferentAccess controller: wizard page: !str 2 id: !str 9 action: index index.html \<% for resort\_basic in @resort\_basics %\> …

---

## [Observe\_field](https://www.ruby-forum.com/t/observe-field/155390)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 11:10am UTC](https://www.ruby-forum.com/t/observe-field/155390 "2008-12-11T11:10:57Z")

</div>

Hi Friends. Its me newb having one Problem. I have 3 dynamic dropdown menus. select Company =\> select Department =\> Select Role. I done this using Observe\_field. Its all works fine in Firefox. But not in IE7 What …

---

## [Image\_tag cannot show picture](https://www.ruby-forum.com/t/image-tag-cannot-show-picture/155308)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 12\
**Last updated:** [December 11, 2008, 9:33am UTC](https://www.ruby-forum.com/t/image-tag-cannot-show-picture/155308 "2008-12-11T09:33:14Z")

</div>

Dear all I am new to rails. In view, I place the following code, but cannot show the picture in the webpage \<%= image\_tag(“green.JPG”) %\> However, I can access the picture in this url http://localhost:3000/images/g…

---

## [Phusion passenger + php](https://www.ruby-forum.com/t/phusion-passenger-php/155383)

<div class="topic-metadata">

**Author:** [@alfredogz](https://www.ruby-forum.com/u/alfredogz)\
**Replies:** 0\
**Last updated:** [December 11, 2008, 8:32am UTC](https://www.ruby-forum.com/t/phusion-passenger-php/155383 "2008-12-11T08:32:11Z")

</div>

Hello , I excuse me if this is a bit offtopic. I have an application running with phusion passenger and It’s working fine for the moment. The problem is that I need to run a php application (phpbb) on the same domain…

---

## [Report generation](https://www.ruby-forum.com/t/report-generation/155304)

<div class="topic-metadata">

**Author:** [@subhadip](https://www.ruby-forum.com/u/subhadip)\
**Replies:** 1\
**Last updated:** [December 11, 2008, 8:25am UTC](https://www.ruby-forum.com/t/report-generation/155304 "2008-12-11T08:25:48Z")

</div>

Hi, i will want to generate a report based on some data in a text file. is it possible in ruby on rails for rails version 2.2.2. please give some hints or tutorial. Thanks

---

## [Ubuntu 8.10 is good for rails](https://www.ruby-forum.com/t/ubuntu-8-10-is-good-for-rails/155379)

<div class="topic-metadata">

**Author:** [@nike](https://www.ruby-forum.com/u/nike)\
**Replies:** 1\
**Last updated:** [December 11, 2008, 8:04am UTC](https://www.ruby-forum.com/t/ubuntu-8-10-is-good-for-rails/155379 "2008-12-11T08:04:44Z")

</div>

whether ubuntu 8.10 is good for working with rails 2.0.2 with ruby 1.8.6 .since by default ubuntu 8.10 is having ruby 1.8.7 and 1.9.so applications created using ruby 1.8.6 is facing problem with ruby version 1.8.7

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

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