# Rails

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

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

---

## [Info on View Helper Methods](https://www.ruby-forum.com/t/info-on-view-helper-methods/153420)

<div class="topic-metadata">

**Author:** [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 12:53pm UTC](https://www.ruby-forum.com/t/info-on-view-helper-methods/153420 "2008-11-24T12:53:24Z")

</div>

Hi there! Can anyone point me in the direction of some resources for building your own view helpers? I want to acheive something simple: In the view, \<%= button do %\> Delete \<% end %\> will give Delete in th…

---

## [Loops](https://www.ruby-forum.com/t/loops/153985)

<div class="topic-metadata">

**Author:** [@smartee](https://www.ruby-forum.com/u/smartee)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 12:15pm UTC](https://www.ruby-forum.com/t/loops/153985 "2008-11-24T12:15:48Z")

</div>

hi friends… please help me!!! for (int i=0; i \< total; ++i) { // do something here @blogid=params\[:blog\]\[:s.id\] # multiple row } Convert Ruby loops

---

## [Best approach for importing data from a file](https://www.ruby-forum.com/t/best-approach-for-importing-data-from-a-file/151663)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 6\
**Last updated:** [November 24, 2008, 11:59am UTC](https://www.ruby-forum.com/t/best-approach-for-importing-data-from-a-file/151663 "2008-11-24T11:59:21Z")

</div>

Hi All, I’ve got a basic Rails app started. One wrinkle is that the user wants ideally to be able to browse the files system (a la Windows Explorer) to select a file and initiate the importation of data from the fil…

---

## [Can't remove gem](https://www.ruby-forum.com/t/cant-remove-gem/153936)

<div class="topic-metadata">

**Author:** [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 10:42am UTC](https://www.ruby-forum.com/t/cant-remove-gem/153936 "2008-11-24T10:42:23Z")

</div>

OK, so someone has figured out that Merb is breaking Rails 2.2.2. There is a gem called do\_sqlite3 which is in conflict with rails. But when I try to do an uninstall, rubygems says that the gem isn’t there but when I …

---

## [Ruby 1.8.7 and rails 2.0.2](https://www.ruby-forum.com/t/ruby-1-8-7-and-rails-2-0-2/153981)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 10:34am UTC](https://www.ruby-forum.com/t/ruby-1-8-7-and-rails-2-0-2/153981 "2008-11-24T10:34:11Z")

</div>

Hi all, Dreamhost updated to ruby 1.8.7 but this breaks my site (rails 2.0.2) Will upgrading my site to rails 2.2 solve the problem as I have red on the net? On ‘Ruby on Rails — A web-app framework that includes every…

---

## [Uncaught exception: controls.js requires including script.ac](https://www.ruby-forum.com/t/uncaught-exception-controls-js-requires-including-script-ac/153975)

<div class="topic-metadata">

**Author:** [@smartee](https://www.ruby-forum.com/u/smartee)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 10:06am UTC](https://www.ruby-forum.com/t/uncaught-exception-controls-js-requires-including-script-ac/153975 "2008-11-24T10:06:27Z")

</div>

hi friends… Ajax problem… please help me. Ajax using delete the record Browser Mozilla my controller: def delete Book.find(params\[:id\]).destroy redirect\_to :action =\>‘book’ end my view: \<%= link\_to\_remote (ima…

---

## ["undefined local variable or method" in view, for "if var"](https://www.ruby-forum.com/t/undefined-local-variable-or-method-in-view-for-if-var/153974)

<div class="topic-metadata">

**Author:** [@squ](https://www.ruby-forum.com/u/squ)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 7:09am UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method-in-view-for-if-var/153974 "2008-11-24T07:09:13Z")

</div>

Hey, this feels like a dumb question, but I feel like this should be working. I have a partial, and sometimes when I render it I’m passing in a variable via :locals called “invisible”, because sometimes I want it to …

---

## [Expire\_fragment Strange behavior](https://www.ruby-forum.com/t/expire-fragment-strange-behavior/153969)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 1\
**Last updated:** [November 24, 2008, 6:10am UTC](https://www.ruby-forum.com/t/expire-fragment-strange-behavior/153969 "2008-11-24T06:10:24Z")

</div>

I’m following railscasts tutorial on fragment caching, everything works great except for the sweepers. When i put expire\_fragment(%r{.\*}) directly in my controller, i can expire my fragments with wonderful ease. Yet w…

---

## [Has\_many (but parent & child should be same table )](https://www.ruby-forum.com/t/has-many-but-parent-child-should-be-same-table/153813)

<div class="topic-metadata">

**Author:** [@thaniyarasu](https://www.ruby-forum.com/u/thaniyarasu)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 4:44am UTC](https://www.ruby-forum.com/t/has-many-but-parent-child-should-be-same-table/153813 "2008-11-24T04:44:34Z")

</div>

i have user table each user have lots of friends how to design ? act\_as\_tree , will it work ? any other suggestion appreciated.

---

## [RESTful url not working](https://www.ruby-forum.com/t/restful-url-not-working/153957)

<div class="topic-metadata">

**Author:** [@Ashit\_V](https://www.ruby-forum.com/u/Ashit_V)\
**Replies:** 4\
**Last updated:** [November 24, 2008, 4:31am UTC](https://www.ruby-forum.com/t/restful-url-not-working/153957 "2008-11-24T04:31:18Z")

</div>

Hi, 'm new to Rails. I tried using \_path and \_url with link\_to helper method but it doesnt work for me. Does anyone know what can be the issue? my code is Hello Rails \<%= flash\[:notice\] %\> \<%= link\_to 'Show Blog', …

---

## [Coupon](https://www.ruby-forum.com/t/coupon/153964)

<div class="topic-metadata">

**Author:** [@rsl](https://www.ruby-forum.com/u/rsl)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 2:31am UTC](https://www.ruby-forum.com/t/coupon/153964 "2008-11-24T02:31:33Z")

</div>

http://www.mrcheapstuff.com/categories/electronics/buycom-coupons/

---

## [Strptime and localization](https://www.ruby-forum.com/t/strptime-and-localization/153961)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 1:20am UTC](https://www.ruby-forum.com/t/strptime-and-localization/153961 "2008-11-24T01:20:51Z")

</div>

Hi, My project uses Date::MONTHNAMES and Date::ABBR\_MONTHNAMES for localization. I’ve run into an issue where I need to use strptime to parse a localized string. Has anyone run into this? How did you fix it? – M.

---

## [Possible bug on find method with :select attribute and aggregate functions](https://www.ruby-forum.com/t/possible-bug-on-find-method-with-select-attribute-and-aggregate-functions/153955)

<div class="topic-metadata">

**Author:** [@alfredmart](https://www.ruby-forum.com/u/alfredmart)\
**Replies:** 2\
**Last updated:** [November 23, 2008, 11:31pm UTC](https://www.ruby-forum.com/t/possible-bug-on-find-method-with-select-attribute-and-aggregate-functions/153955 "2008-11-23T23:31:28Z")

</div>

Hi to everyboy… I need your help in order to know if I get wrong… I have this migration file: class CreateSpecifications \< ActiveRecord::Migration def self.up create\_table :specifications do |t| t.string :tolerancia …

---

## [Rake rails:update](https://www.ruby-forum.com/t/rake-rails-update/153956)

<div class="topic-metadata">

**Author:** [@Schalk\_N](https://www.ruby-forum.com/u/Schalk_N)\
**Replies:** 0\
**Last updated:** [November 23, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/rake-rails-update/153956 "2008-11-23T22:51:03Z")

</div>

Hey all, Are you supposed to get some type of feedback when running the rake rails:update task from a rails shell? And on that subject, I installed Rails 2.2.2 and then ran the the above command, got no feedback and …

---

## [Strange behavior of alias\_method\_chains](https://www.ruby-forum.com/t/strange-behavior-of-alias-method-chains/153953)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 4\
**Last updated:** [November 23, 2008, 10:07pm UTC](https://www.ruby-forum.com/t/strange-behavior-of-alias-method-chains/153953 "2008-11-23T22:07:05Z")

</div>

Greetings. I’ve got very strange behavior of alias\_method\_chains, and I hope someone will advise me. I have a rails 2.2.2 app created with #rails aliasApp , a class XYZ residing in app/helpers/xyz.rb: class XYZ at…

---

## [selectedIndex update](https://www.ruby-forum.com/t/selectedindex-update/153831)

<div class="topic-metadata">

**Author:** [@will](https://www.ruby-forum.com/u/will)\
**Replies:** 5\
**Last updated:** [November 23, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/selectedindex-update/153831 "2008-11-23T20:48:28Z")

</div>

I have a table with a collection select object that I am looking update the selectedIndex of using links on the page \<%= collection\_select(:machine, :user\_id, @users, :id, :fullname, {:include\_blank =\> true}, html\_op…

---

## [List of Rails Development Studios?](https://www.ruby-forum.com/t/list-of-rails-development-studios/153948)

<div class="topic-metadata">

**Author:** [@caiwangqin](https://www.ruby-forum.com/u/caiwangqin)\
**Replies:** 1\
**Last updated:** [November 23, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/list-of-rails-development-studios/153948 "2008-11-23T18:20:13Z")

</div>

Hello, I’m nearing completion of my first paying project. Without going into details of my situation up front, I’d like to ask if there is somewhere a list of firms that specialize in Rails development.

---

## [Recent and Popular Posts in Beast Forum](https://www.ruby-forum.com/t/recent-and-popular-posts-in-beast-forum/153947)

<div class="topic-metadata">

**Author:** [@GearSSS\_id\_OSCealla](https://www.ruby-forum.com/u/GearSSS_id_OSCealla)\
**Replies:** 0\
**Last updated:** [November 23, 2008, 4:57pm UTC](https://www.ruby-forum.com/t/recent-and-popular-posts-in-beast-forum/153947 "2008-11-23T16:57:25Z")

</div>

Hi, so I’ve integrated the Beast forum into my ruby on rails website and would like to display some of the forum data throughout the website. Basically, I’d like to list the last 5 posts to a UNIQUE topic, and also t…

---

## [Rename public/images](https://www.ruby-forum.com/t/rename-public-images/153932)

<div class="topic-metadata">

**Author:** [@xinu](https://www.ruby-forum.com/u/xinu)\
**Replies:** 1\
**Last updated:** [November 23, 2008, 4:44pm UTC](https://www.ruby-forum.com/t/rename-public-images/153932 "2008-11-23T16:44:32Z")

</div>

Is it possible to rename the images folder. Thanks Michael

---

## [Mislav-will\_paginate and acts\_as\_taggable\_on\_steorids problem](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 8\
**Last updated:** [November 23, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-and-acts-as-taggable-on-steorids-problem/153884 "2008-11-23T16:00:00Z")

</div>

I always get the following problem: Loading development environment (Rails 2.2.2) \>\> p = Frontpage.find 1 =\> #\<Frontpage id: 1, worker\_id: 1, description: “dsadsa”, show\_date: “2008-11-22 11:20:27”, hide\_date: “2008-1…

---

## [How could I uninstall the build-in gems in Leopard](https://www.ruby-forum.com/t/how-could-i-uninstall-the-build-in-gems-in-leopard/153445)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [November 23, 2008, 3:48pm UTC](https://www.ruby-forum.com/t/how-could-i-uninstall-the-build-in-gems-in-leopard/153445 "2008-11-23T15:48:50Z")

</div>

I am a newbie on the Mac and ROR. I am trying to install the rails on my Leopard today and get its done. But I found for many of the gems, there are tow versions installed on my machine. There is a lower version insta…

---

## [Ajax and Flash notice](https://www.ruby-forum.com/t/ajax-and-flash-notice/153944)

<div class="topic-metadata">

**Author:** [@nuugii](https://www.ruby-forum.com/u/nuugii)\
**Replies:** 0\
**Last updated:** [November 23, 2008, 3:02pm UTC](https://www.ruby-forum.com/t/ajax-and-flash-notice/153944 "2008-11-23T15:02:31Z")

</div>

I’m using some AJAX to create a form, and when the form is saved, I want to give the user some information. How to show flash notice in my main layout.

---

## [What's wrong with this code? (hitting my head against a wall)](https://www.ruby-forum.com/t/whats-wrong-with-this-code-hitting-my-head-against-a-wall/153874)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 8\
**Last updated:** [November 23, 2008, 1:39pm UTC](https://www.ruby-forum.com/t/whats-wrong-with-this-code-hitting-my-head-against-a-wall/153874 "2008-11-23T13:39:06Z")

</div>

Hi, I’m just trying to load a set of options which doesn’t require tables (i.e. using tableless plugin). Error when going to view at “http://localhost:3000/graph2/edit” is undefined method \`calc\_type’ for Line(Table …

---

## [A question about rails view code](https://www.ruby-forum.com/t/a-question-about-rails-view-code/153939)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 1\
**Last updated:** [November 23, 2008, 1:26pm UTC](https://www.ruby-forum.com/t/a-question-about-rails-view-code/153939 "2008-11-23T13:26:48Z")

</div>

I am new to rails. I read some examples and don’t understand rails erb syntax. There is a piece of code I am not familiar: \<% form\_for(@bay\_info) do |f| %\> \<%= f.error\_messages %\> \<%= f.label :HostName %\> …

---

## [How can I set default value for each column in a Database?](https://www.ruby-forum.com/t/how-can-i-set-default-value-for-each-column-in-a-database/153937)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 1\
**Last updated:** [November 23, 2008, 12:42pm UTC](https://www.ruby-forum.com/t/how-can-i-set-default-value-for-each-column-in-a-database/153937 "2008-11-23T12:42:52Z")

</div>

I know I can set it on add\_column command but I am looking for a way to set the default when creating the Table. See below code, how can I set each of them a default value. def self.up create\_table :bay\_infos, :prima…

---

## [Click this one U've a lot of opportunity](https://www.ruby-forum.com/t/click-this-one-uve-a-lot-of-opportunity/153935)

<div class="topic-metadata">

**Author:** [@tamil](https://www.ruby-forum.com/u/tamil)\
**Replies:** 0\
**Last updated:** [November 23, 2008, 11:59am UTC](https://www.ruby-forum.com/t/click-this-one-uve-a-lot-of-opportunity/153935 "2008-11-23T11:59:27Z")

</div>

Click this one U’ve a lot of opportunity Click this one U’ve a lot of opportunity http://www.AWSurveys.com/HomeMain.cfm?RefID=willam Click this one U’ve a lot of opportunity http://www.AWSurveys.com/HomeMain.cfm?Re…

---

## [Email attachment corrupted](https://www.ruby-forum.com/t/email-attachment-corrupted/153881)

<div class="topic-metadata">

**Author:** [@up1notch](https://www.ruby-forum.com/u/up1notch)\
**Replies:** 1\
**Last updated:** [November 23, 2008, 9:32am UTC](https://www.ruby-forum.com/t/email-attachment-corrupted/153881 "2008-11-23T09:32:44Z")

</div>

Having some problem with sending email with attachment: I am able to send an email without attachment via gmail server. However, when i tried to send an image attachment, it is corrupted at the recipient mailbox; coz …

---

## [No success deploying Typo (latest trunk from github)](https://www.ruby-forum.com/t/no-success-deploying-typo-latest-trunk-from-github/153925)

<div class="topic-metadata">

**Author:** [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Replies:** 0\
**Last updated:** [November 23, 2008, 2:55am UTC](https://www.ruby-forum.com/t/no-success-deploying-typo-latest-trunk-from-github/153925 "2008-11-23T02:55:19Z")

</div>

Hi everybody, I am still struggling to get Typo running using Phusion Passenger on a Debian Etch setup with Apache 2.2. I’ve got Typo git-cloned into /home/www/typo with the typo subdirectory owned by www-data:www-da…

---

## [Graticule 0.2.8 and acts\_as\_geocodable problems](https://www.ruby-forum.com/t/graticule-0-2-8-and-acts-as-geocodable-problems/153920)

<div class="topic-metadata">

**Author:** [@silent\_Se](https://www.ruby-forum.com/u/silent_Se)\
**Replies:** 0\
**Last updated:** [November 23, 2008, 2:14am UTC](https://www.ruby-forum.com/t/graticule-0-2-8-and-acts-as-geocodable-problems/153920 "2008-11-23T02:14:34Z")

</div>

is anybody running Graticule 0.2.8 successfully? My site is using the acts\_as\_geocodable plugin and when I load the console or restart my mongrels, I get this error… vendor/plugins/acts\_as\_geocodable/init.rb:4:in \`e…

---

## [Mongrel cluster processes not starting](https://www.ruby-forum.com/t/mongrel-cluster-processes-not-starting/153888)

<div class="topic-metadata">

**Author:** [@r-a-mueller](https://www.ruby-forum.com/u/r-a-mueller)\
**Replies:** 2\
**Last updated:** [November 23, 2008, 2:04am UTC](https://www.ruby-forum.com/t/mongrel-cluster-processes-not-starting/153888 "2008-11-23T02:04:02Z")

</div>

I am starting my mongrel processes with mongrel\_rails cluster::start or sudo mongrel\_rails cluster::start starting port 8000 starting port 8001 starting port 8002 starting port 8003 and they appear to have starte…

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

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