# Rails

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

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

---

## [Problem with Ajax response with the use of action.js.rjs file](https://www.ruby-forum.com/t/problem-with-ajax-response-with-the-use-of-action-js-rjs-file/141305)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 3:52pm UTC](https://www.ruby-forum.com/t/problem-with-ajax-response-with-the-use-of-action-js-rjs-file/141305 "2008-06-24T15:52:56Z")

</div>

I am trying to get a grasp of Ajax response in ROR. Following the examples in the ROR API and the books Simply Rails 2 from Sitepoint, following are the code snippets from votes\_controller and create.js.rjs: (from ap…

---

## [Why environment.rb is useless?](https://www.ruby-forum.com/t/why-environment-rb-is-useless/141291)

<div class="topic-metadata">

**Author:** [@Bobov](https://www.ruby-forum.com/u/Bobov)\
**Replies:** 3\
**Last updated:** [June 24, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/why-environment-rb-is-useless/141291 "2008-06-24T15:49:24Z")

</div>

Dear all, I’m a newbie in ROR. my environment: ruby 1.8.5 rails 2.0.2 Lighttpd scgi\_rails 0.4.3 working in development model. questions: I made some changes to config/environment.rb, and restart lighttpd, bu…

---

## [Open\_uri on invalid URLs](https://www.ruby-forum.com/t/open-uri-on-invalid-urls/141302)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/open-uri-on-invalid-urls/141302 "2008-06-24T15:18:13Z")

</div>

Hi I am using open(public\_url) in one of the modules and it works fine as long as public\_url is a valid URL. But when i give an invalid URL, i do not have control on error raised- My application fails and log shows : …

---

## [Insert data into databese](https://www.ruby-forum.com/t/insert-data-into-databese/141175)

<div class="topic-metadata">

**Author:** [@soutom](https://www.ruby-forum.com/u/soutom)\
**Replies:** 5\
**Last updated:** [June 24, 2008, 3:03pm UTC](https://www.ruby-forum.com/t/insert-data-into-databese/141175 "2008-06-24T15:03:35Z")

</div>

i have 2 veriables…such as industry = “Oil” company = “XXXXX” again i hv a table named industry\_details…this table contain three field i.e IndID, IndType,Ind\_company Here IndID auto-incriment… So how can i insert t…

---

## [Installing Rails](https://www.ruby-forum.com/t/installing-rails/141155)

<div class="topic-metadata">

**Author:** [@vbfischer](https://www.ruby-forum.com/u/vbfischer)\
**Replies:** 6\
**Last updated:** [June 24, 2008, 1:52pm UTC](https://www.ruby-forum.com/t/installing-rails/141155 "2008-06-24T13:52:29Z")

</div>

Having a god-awful time installing Rails. I started with the instructions found on this page: http://articles.slicehost.com/2007/11/23/ubuntu-gutsy-mysql-and-ror I get the following error: vbfischer@ubuntu:~$ sudo ge…

---

## [How to Print A Document Only](https://www.ruby-forum.com/t/how-to-print-a-document-only/140398)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 4\
**Last updated:** [June 24, 2008, 1:36pm UTC](https://www.ruby-forum.com/t/how-to-print-a-document-only/140398 "2008-06-24T13:36:05Z")

</div>

I am using PDF::writer to convert text to pdf files for printing. What I would like to do is to be able to print it without allowing the user to be able to read the files in pdf. What options do I have ? If I send the…

---

## [How to send window.location.hash (string after # in the url) along post request](https://www.ruby-forum.com/t/how-to-send-window-location-hash-string-after-in-the-url-along-post-request/141288)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 12:50pm UTC](https://www.ruby-forum.com/t/how-to-send-window-location-hash-string-after-in-the-url-along-post-request/141288 "2008-06-24T12:50:34Z")

</div>

Hi, I got some old javascript tab system and I’m trying to rewrite it to make use of window.location.hash to set proper tab after the page is loaded. It more or less works, but the main problem is that I got some for…

---

## [How to return more than one value from a function?](https://www.ruby-forum.com/t/how-to-return-more-than-one-value-from-a-function/141269)

<div class="topic-metadata">

**Author:** [@suneeta](https://www.ruby-forum.com/u/suneeta)\
**Replies:** 5\
**Last updated:** [June 24, 2008, 12:44pm UTC](https://www.ruby-forum.com/t/how-to-return-more-than-one-value-from-a-function/141269 "2008-06-24T12:44:54Z")

</div>

Hi In an action in admin\_controller, I called a method in the model ci.rb The code is shown below: In controller: can\_delete = Ci.is\_ci\_class\_in\_use(ci\_type, @ci\_classes) Then in model: class Ci \< ActiveRecord::Ba…

---

## [RMagick installation on 64bit ubuntu 7.04](https://www.ruby-forum.com/t/rmagick-installation-on-64bit-ubuntu-7-04/141282)

<div class="topic-metadata">

**Author:** [@ishan](https://www.ruby-forum.com/u/ishan)\
**Replies:** 6\
**Last updated:** [June 24, 2008, 12:37pm UTC](https://www.ruby-forum.com/t/rmagick-installation-on-64bit-ubuntu-7-04/141282 "2008-06-24T12:37:16Z")

</div>

Dear All, Thanks in advance ! i have ubuntu 7.04 64 bit installed… i want to install RMagick 2.5 and i have done that installation but it is working ? here are some outputs root@bpocanada-desktop:/home/bpocanada/D…

---

## [Customising url](https://www.ruby-forum.com/t/customising-url/140966)

<div class="topic-metadata">

**Author:** [@sonu](https://www.ruby-forum.com/u/sonu)\
**Replies:** 9\
**Last updated:** [June 24, 2008, 12:22pm UTC](https://www.ruby-forum.com/t/customising-url/140966 "2008-06-24T12:22:21Z")

</div>

Hi, In my web application i need to select date and and vendor to display the corresponding data When i select the date, it doesn’t get displayed in the url i.e the url remains the same but when i select the vendor …

---

## [Builder (XML)](https://www.ruby-forum.com/t/builder-xml/141189)

<div class="topic-metadata">

**Author:** [@demo](https://www.ruby-forum.com/u/demo)\
**Replies:** 6\
**Last updated:** [June 24, 2008, 11:54am UTC](https://www.ruby-forum.com/t/builder-xml/141189 "2008-06-24T11:54:57Z")

</div>

Hello! I’ve found what appears to be a bug in the builder library, but don’t know where to report it. The problem occurs when using indentation (i.e. :indent \> 0) and when the most deeply nested command contains a bl…

---

## [Cross domain cookie](https://www.ruby-forum.com/t/cross-domain-cookie/141270)

<div class="topic-metadata">

**Author:** [@unni123](https://www.ruby-forum.com/u/unni123)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 11:23am UTC](https://www.ruby-forum.com/t/cross-domain-cookie/141270 "2008-06-24T11:23:52Z")

</div>

My rails server runs on localhost. I want to set a cookie for the domain “.myapp.com”. How do I do this? (i tried cookies\['xyz\] = {:value =\> ‘abc’ ,:domain =\> ‘.myapp.com’} . It doesnt work. No cookie is being set whe…

---

## [From Instant Rails 2.0 to Rails 2.1.0 - cache problem](https://www.ruby-forum.com/t/from-instant-rails-2-0-to-rails-2-1-0-cache-problem/141256)

<div class="topic-metadata">

**Author:** [@ppjunty](https://www.ruby-forum.com/u/ppjunty)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 11:18am UTC](https://www.ruby-forum.com/t/from-instant-rails-2-0-to-rails-2-1-0-cache-problem/141256 "2008-06-24T11:18:01Z")

</div>

i’m trying to update to rails 2.1 using instant rails, so i can use the new cache features, but when i try to use the method “Rails.cache.write” in my controller, i get the message “undefined method \`cache’ for Rai…

---

## [Cache issue with attr\_accessor field](https://www.ruby-forum.com/t/cache-issue-with-attr-accessor-field/141287)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 11:15am UTC](https://www.ruby-forum.com/t/cache-issue-with-attr-accessor-field/141287 "2008-06-24T11:15:05Z")

</div>

Hi, I’ve got a model with the following attribute added: attr\_accessor :level which does not exist in the database. After putting instances of this model in the cache (using Rails.cache.fetch(‘foo’) { Category.all } …

---

## [Improved support for model namespaces](https://www.ruby-forum.com/t/improved-support-for-model-namespaces/141285)

<div class="topic-metadata">

**Author:** [@harrikauhanen](https://www.ruby-forum.com/u/harrikauhanen)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 11:10am UTC](https://www.ruby-forum.com/t/improved-support-for-model-namespaces/141285 "2008-06-24T11:10:59Z")

</div>

I wanted Rails to support namespaced models even better that it does today. So I wrote a patch that will make Rails generators support namespaced models. You could e.g. script/generate scaffold Animal::Dog and get ful…

---

## [Any OpenSource Projects available...Like this?](https://www.ruby-forum.com/t/any-opensource-projects-available-like-this/141280)

<div class="topic-metadata">

**Author:** [@softmind](https://www.ruby-forum.com/u/softmind)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 9:23am UTC](https://www.ruby-forum.com/t/any-opensource-projects-available-like-this/141280 "2008-06-24T09:23:02Z")

</div>

Hi, I am looking forward to see an Open Source Projects in … (1) Yellow Pages (2) City Portal (3) Classifieds (4) Dating (5) Forums (6) Jobs (7) Real Estate The main problem on GitHub and SourceForge is that… Ma…

---

## [Named routes problem](https://www.ruby-forum.com/t/named-routes-problem/141276)

<div class="topic-metadata">

**Author:** [@balavrscse](https://www.ruby-forum.com/u/balavrscse)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 8:50am UTC](https://www.ruby-forum.com/t/named-routes-problem/141276 "2008-06-24T08:50:13Z")

</div>

Hello everybody, I have one doubt,In routes i have mentioned as following, map.blogpost ':controller/:action/:id', :controller =\> 'a', :action =\> 'blogpost' map.help\_pages ':controller…

---

## [Which Chapters are still Valid from Agile Web 2nd Edition](https://www.ruby-forum.com/t/which-chapters-are-still-valid-from-agile-web-2nd-edition/141264)

<div class="topic-metadata">

**Author:** [@rahil](https://www.ruby-forum.com/u/rahil)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 6:47am UTC](https://www.ruby-forum.com/t/which-chapters-are-still-valid-from-agile-web-2nd-edition/141264 "2008-06-24T06:47:45Z")

</div>

Which Chapters are still Valid from Agile Web D. with Rails 2nd Edition…? Hi, I am aware that the third edition ( Beta ) is available for use. But it seems many students already have 2nd edition on their shelves, whic…

---

## [Handling content pages (CMS-like)](https://www.ruby-forum.com/t/handling-content-pages-cms-like/140961)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 4\
**Last updated:** [June 24, 2008, 6:16am UTC](https://www.ruby-forum.com/t/handling-content-pages-cms-like/140961 "2008-06-24T06:16:44Z")

</div>

Hello list, I wonder how you guys handle content pages? Often described as “static” pages. However, I don’t like to call them “static” because these pages often do use some minor dynamic content. This is what I lik…

---

## [Problem Installing RMagick with Instant Rails on Windows](https://www.ruby-forum.com/t/problem-installing-rmagick-with-instant-rails-on-windows/120990)

<div class="topic-metadata">

**Author:** [@Walter\_Lockhart](https://www.ruby-forum.com/u/Walter_Lockhart)\
**Replies:** 7\
**Last updated:** [June 24, 2008, 4:51am UTC](https://www.ruby-forum.com/t/problem-installing-rmagick-with-instant-rails-on-windows/120990 "2008-06-24T04:51:23Z")

</div>

I’m running Instant Rails 1.4 on Windows XP with SP2. I have downloaded the Windows binary version of RMagick from the RubyForge page. Specifically, I have downloaded: 1.14.1 binary gem for Ruby 1.8.5 (fixed for Ruby…

---

## [Check for Nil Everytime?](https://www.ruby-forum.com/t/check-for-nil-everytime/141247)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 8\
**Last updated:** [June 24, 2008, 4:27am UTC](https://www.ruby-forum.com/t/check-for-nil-everytime/141247 "2008-06-24T04:27:25Z")

</div>

So I have a view where I take a date and I run a strftime("%b %d") date format a string, right? Ok, now if the date can be nil ; if that is the case I dont want an error message being thrown if I call strftime on it. …

---

## [Prompt in select\_tag](https://www.ruby-forum.com/t/prompt-in-select-tag/141144)

<div class="topic-metadata">

**Author:** [@mailbox\_abhishek](https://www.ruby-forum.com/u/mailbox_abhishek)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 4:00am UTC](https://www.ruby-forum.com/t/prompt-in-select-tag/141144 "2008-06-24T04:00:18Z")

</div>

How can I use select\_tag to Have a prompt like “Select a Value” ( selected by default ) I tried this but did not work: \<%= select\_tag :current\_course, options\_for\_select( Course.find(:all).map {|p| \[…

---

## [What is Best Way of Tackling Rising Data Anomalies](https://www.ruby-forum.com/t/what-is-best-way-of-tackling-rising-data-anomalies/141253)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 3:22am UTC](https://www.ruby-forum.com/t/what-is-best-way-of-tackling-rising-data-anomalies/141253 "2008-06-24T03:22:21Z")

</div>

Here is a problem: while the user is adding , deleting and modifying data , data anomalies can arise, for example take the the two table A, B which are joined by the intermediate join table A\_B: \[A\] id:integer name:…

---

## [Getting InvalidAuthenticityToken errors quite often](https://www.ruby-forum.com/t/getting-invalidauthenticitytoken-errors-quite-often/138415)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 3:12am UTC](https://www.ruby-forum.com/t/getting-invalidauthenticitytoken-errors-quite-often/138415 "2008-06-24T03:12:24Z")

</div>

How often is the authenticity token updated? The latest error that I got was a submittal of a form, an model validation occured, I click back, make the correction, resubmit the form, then I get an InvalidAuthenticityT…

---

## [Column Sorting](https://www.ruby-forum.com/t/column-sorting/196721)

<div class="topic-metadata">

**Author:** [@apneram](https://www.ruby-forum.com/u/apneram)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 3:12am UTC](https://www.ruby-forum.com/t/column-sorting/196721 "2008-06-24T03:12:24Z")

</div>

Hello, Newbie to rails!! I am trying to sort on the column header in my web page. Any suggestions what would be the most efficient way to do that? Thank you for your help

---

## [Find\_by\_sql Doesn't Return Attributes?](https://www.ruby-forum.com/t/find-by-sql-doesnt-return-attributes/141236)

<div class="topic-metadata">

**Author:** [@karlshea](https://www.ruby-forum.com/u/karlshea)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 3:03am UTC](https://www.ruby-forum.com/t/find-by-sql-doesnt-return-attributes/141236 "2008-06-24T03:03:35Z")

</div>

My find\_by\_sql is not returning attributes of the calling model class. Thermo.find\_by\_sql(“SELECT COUNT(\*) FROM thermo WHERE thermo\_loc = ‘back’ GROUP BY DAYOFWEEK(time\_on) ASC”) ==\> \[#, #, #, #, #, #, #\] The sql is …

---

## [Use production environment in other environments](https://www.ruby-forum.com/t/use-production-environment-in-other-environments/141248)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 3\
**Last updated:** [June 24, 2008, 2:38am UTC](https://www.ruby-forum.com/t/use-production-environment-in-other-environments/141248 "2008-06-24T02:38:28Z")

</div>

Hi, I created a new staging environment for my Rails application called “staging”. I would like to use the production database while in the staging mode. I’m pretty sure I need to modify environments/staging.rb (whic…

---

## [I'm looking for deployment help - $350](https://www.ruby-forum.com/t/im-looking-for-deployment-help-350/141241)

<div class="topic-metadata">

**Author:** [@nationwideforum](https://www.ruby-forum.com/u/nationwideforum)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 2:05am UTC](https://www.ruby-forum.com/t/im-looking-for-deployment-help-350/141241 "2008-06-24T02:05:09Z")

</div>

I’m looking for someone to deploy a Ruby/social networking site for $350. I’ve had a developer estimate it could take about 8 hours to complete. I’m not a programmer, but I’ve been told insoshi would be a good off-the…

---

## [ActionMailer Fails To Send Emails Post Authentication](https://www.ruby-forum.com/t/actionmailer-fails-to-send-emails-post-authentication/141234)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 2:02am UTC](https://www.ruby-forum.com/t/actionmailer-fails-to-send-emails-post-authentication/141234 "2008-06-24T02:02:51Z")

</div>

I am trying to send emails via actionmailer. It was working fine before and now suddenly what was working is no longer working! I have one version of the application running in production and whenever I try to run it…

---

## [Any one up for a CHALLENGE?](https://www.ruby-forum.com/t/any-one-up-for-a-challenge/141232)

<div class="topic-metadata">

**Author:** [@apneram](https://www.ruby-forum.com/u/apneram)\
**Replies:** 3\
**Last updated:** [June 24, 2008, 1:58am UTC](https://www.ruby-forum.com/t/any-one-up-for-a-challenge/141232 "2008-06-24T01:58:58Z")

</div>

Define a simple way to sort the contents of a column upon clicking the column name in the web app!!

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

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