# Rails

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

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

---

## [Best open source application framework poll on linkedin- Grails ahead of Rails](https://www.ruby-forum.com/t/best-open-source-application-framework-poll-on-linkedin-grails-ahead-of-rails/166419)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [April 24, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/best-open-source-application-framework-poll-on-linkedin-grails-ahead-of-rails/166419 "2009-04-24T23:16:59Z")

</div>

Hi I posted a poll on linkedin to know what people think about open source application frameworks. People have voted for Grails over Rails till now. One of the reason might be performance (Grails on JVM). Do you also…

---

## [Groups Permissions](https://www.ruby-forum.com/t/groups-permissions/156375)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 24, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/groups-permissions/156375 "2009-04-24T23:10:25Z")

</div>

Hi All, Is there any rails gem for maintaining groups and permissions. I am really struggling on this for days. Please let me know if any. If there is no gem to serve me I have to sit and work for the framework compo…

---

## [Test Errors giving me Error 500 and wont display site](https://www.ruby-forum.com/t/test-errors-giving-me-error-500-and-wont-display-site/166404)

<div class="topic-metadata">

**Author:** [@adsouzp](https://www.ruby-forum.com/u/adsouzp)\
**Replies:** 1\
**Last updated:** [April 24, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/test-errors-giving-me-error-500-and-wont-display-site/166404 "2009-04-24T22:30:39Z")

</div>

When I “rake db:migrate RAILS\_ENV=production” this is what I get that leads to the “Something went wrong” page. The application runs fine in development mode. Could someone help me find where the problem is? zelopast…

---

## ["@marshal\_with\_utc\_coercion": false?](https://www.ruby-forum.com/t/marshal-with-utc-coercion-false/166403)

<div class="topic-metadata">

**Author:** [@morgan](https://www.ruby-forum.com/u/morgan)\
**Replies:** 4\
**Last updated:** [April 24, 2009, 10:17pm UTC](https://www.ruby-forum.com/t/marshal-with-utc-coercion-false/166403 "2009-04-24T22:17:10Z")

</div>

this is a debug on the @schedules variable which contains a bunch of start and end times pulled from a mysql database. attributes: schedule\_type: “7” schedule\_start: 2009-04-24 04:00:00 id: “21” uid: “12” schedule…

---

## [Getting list of drives using ruby on rails](https://www.ruby-forum.com/t/getting-list-of-drives-using-ruby-on-rails/166260)

<div class="topic-metadata">

**Author:** [@murwath](https://www.ruby-forum.com/u/murwath)\
**Replies:** 6\
**Last updated:** [April 24, 2009, 9:39pm UTC](https://www.ruby-forum.com/t/getting-list-of-drives-using-ruby-on-rails/166260 "2009-04-24T21:39:40Z")

</div>

Hi All, I had been assigned work of ruby on rails from two days . Using ruby on rails how do we get the list of drives present in a system ex : c:\\ , d:\\ etc If anyone know this pls send me the code. Thanks & Regard…

---

## [Booked too many rooms for Railsconf](https://www.ruby-forum.com/t/booked-too-many-rooms-for-railsconf/196950)

<div class="topic-metadata">

**Author:** [@Marz](https://www.ruby-forum.com/u/Marz)\
**Replies:** 0\
**Last updated:** [April 24, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/booked-too-many-rooms-for-railsconf/196950 "2009-04-24T21:08:31Z")

</div>

Booked 4 Rooms we aren’t going to use, walking distance to the Conference. Four nights: Sunday 5-3-09 through Wednesday 5-6-09. Willing to let them go for about HALF the price of the Hilton. Call Martin at 760-237-405…

---

## [Belongs\_to not working as expected](https://www.ruby-forum.com/t/belongs-to-not-working-as-expected/166395)

<div class="topic-metadata">

**Author:** [@uberlordchris](https://www.ruby-forum.com/u/uberlordchris)\
**Replies:** 1\
**Last updated:** [April 24, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/belongs-to-not-working-as-expected/166395 "2009-04-24T21:06:17Z")

</div>

I’m using ActiveRecord 2.3.2. I have a class with a belongs\_to association like this: class Foo \< ActiveRecord::Base belongs\_to :bar end It is valid for bar to be nil (thus, in the database, foos.bar\_id can be nul…

---

## [Listing of Category error](https://www.ruby-forum.com/t/listing-of-category-error/166384)

<div class="topic-metadata">

**Author:** [@haneef5k](https://www.ruby-forum.com/u/haneef5k)\
**Replies:** 3\
**Last updated:** [April 24, 2009, 8:35pm UTC](https://www.ruby-forum.com/t/listing-of-category-error/166384 "2009-04-24T20:35:06Z")

</div>

Im trying to see posts index page, In tat im showing category list, im using collect method it show error… ActiveRecord::StatementInvalid in Posts#index Showing app/views/posts/index.html.erb where line #19 raised: M…

---

## [Recipe to handle session expiration in ajax calls](https://www.ruby-forum.com/t/recipe-to-handle-session-expiration-in-ajax-calls/166386)

<div class="topic-metadata">

**Author:** [@rgagnon](https://www.ruby-forum.com/u/rgagnon)\
**Replies:** 2\
**Last updated:** [April 24, 2009, 8:31pm UTC](https://www.ruby-forum.com/t/recipe-to-handle-session-expiration-in-ajax-calls/166386 "2009-04-24T20:31:35Z")

</div>

Hello, I’m looking for a recipe to handle session logged out or expired in an ajax calls. For instance, lets say we have a form submission in ajax that the user needs to be authenticated to perform this action. I’d …

---

## [Cant able to edit and new post](https://www.ruby-forum.com/t/cant-able-to-edit-and-new-post/166402)

<div class="topic-metadata">

**Author:** [@haneef5k](https://www.ruby-forum.com/u/haneef5k)\
**Replies:** 0\
**Last updated:** [April 24, 2009, 8:30pm UTC](https://www.ruby-forum.com/t/cant-able-to-edit-and-new-post/166402 "2009-04-24T20:30:24Z")

</div>

i want to show fullname by using fuction call ‘get\_user\_list’ , but its not working…?? tis s user.rb ( def full\_name self.first\_name + " " + self.last\_name end ) my post controller ( def get\_user\_list return U…

---

## [Html safe and \<%=h](https://www.ruby-forum.com/t/html-safe-and-h/166381)

<div class="topic-metadata">

**Author:** [@Suman\_G](https://www.ruby-forum.com/u/Suman_G)\
**Replies:** 2\
**Last updated:** [April 24, 2009, 8:18pm UTC](https://www.ruby-forum.com/t/html-safe-and-h/166381 "2009-04-24T20:18:41Z")

</div>

Hi all, This is kinda a noob question. Can someone please explain what html safe mean, and what the function h in rails do and what are the best times to use it. Even links will be helpful but i am doubtful if any go…

---

## [Problem while connecting to MYSQL from NetBeans](https://www.ruby-forum.com/t/problem-while-connecting-to-mysql-from-netbeans/166337)

<div class="topic-metadata">

**Author:** [@lakshmi](https://www.ruby-forum.com/u/lakshmi)\
**Replies:** 6\
**Last updated:** [April 24, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/problem-while-connecting-to-mysql-from-netbeans/166337 "2009-04-24T20:08:44Z")

</div>

Hi All, I am new to Ruby , ROR and NetBeans. I am using Netbeans 6.5, Ruby 1.8 versions. I created New Project in NetBeans by giving Project Name as DBTest, selected Ruby Platform as Ruby 1.8.6-p111, server as Mongre…

---

## [Setting attributes on a has\_many through relationship](https://www.ruby-forum.com/t/setting-attributes-on-a-has-many-through-relationship/166399)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 0\
**Last updated:** [April 24, 2009, 8:01pm UTC](https://www.ruby-forum.com/t/setting-attributes-on-a-has-many-through-relationship/166399 "2009-04-24T20:01:02Z")

</div>

The has\_many through setup detailed below allows me to do @system.software \<\< and @software.systems \<\< for establishing the relationships, using an array of software or system objects, respectively. This works out we…

---

## [Daemons error -- probably a simple fix](https://www.ruby-forum.com/t/daemons-error-probably-a-simple-fix/166344)

<div class="topic-metadata">

**Author:** [@gaveeno](https://www.ruby-forum.com/u/gaveeno)\
**Replies:** 3\
**Last updated:** [April 24, 2009, 7:05pm UTC](https://www.ruby-forum.com/t/daemons-error-probably-a-simple-fix/166344 "2009-04-24T19:05:25Z")

</div>

I followed the instructions at for creating a daemon. Simple enough, right? Wrong… For some reason, I keep getting an error when running the daemon even if I remove all my custom code from the generated code. Anyb…

---

## [Convention for setting join model fields when associating](https://www.ruby-forum.com/t/convention-for-setting-join-model-fields-when-associating/166392)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [April 24, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/convention-for-setting-join-model-fields-when-associating/166392 "2009-04-24T18:00:34Z")

</div>

Hi folks I have this situation: Region has\_many :policy\_indicator\_allocations, :order =\> “position” has\_many :policy\_indicators, :through =\> :policy\_indicator\_allocations PolicyIndicatorAllocation belongs\_to :regio…

---

## [Running in non-dev envs. with script/runner shebang setup](https://www.ruby-forum.com/t/running-in-non-dev-envs-with-script-runner-shebang-setup/166365)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 4\
**Last updated:** [April 24, 2009, 5:21pm UTC](https://www.ruby-forum.com/t/running-in-non-dev-envs-with-script-runner-shebang-setup/166365 "2009-04-24T17:21:33Z")

</div>

All, I have a script that runs script/runner via the shebang mechanism at the top o the file, like so: #!/usr/bin/env ./script/runner This works fine in development, how would I get it to run in non-development envi…

---

## [RJS sporadic error message](https://www.ruby-forum.com/t/rjs-sporadic-error-message/165992)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [April 24, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/rjs-sporadic-error-message/165992 "2009-04-24T16:47:32Z")

</div>

I have this form that allows a user to enter a username and save it, assocciating your profile with theirs via an id. A list gets updated and a partial is displayed. The problem is that when I hit the submit button to…

---

## [Long string in crypting](https://www.ruby-forum.com/t/long-string-in-crypting/166378)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 4\
**Last updated:** [April 24, 2009, 4:14pm UTC](https://www.ruby-forum.com/t/long-string-in-crypting/166378 "2009-04-24T16:14:52Z")

</div>

I use a solution to crypt a string that I found using OpenSSL. But the crypted string becomes very long, too long for a varchar 255 to hold it. What can I do to make it shorter? Or should I just use text as column in …

---

## [JQuery Ajax problem=Weird- works once stops next](https://www.ruby-forum.com/t/jquery-ajax-problem-weird-works-once-stops-next/166372)

<div class="topic-metadata">

**Author:** [@preethi](https://www.ruby-forum.com/u/preethi)\
**Replies:** 1\
**Last updated:** [April 24, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/jquery-ajax-problem-weird-works-once-stops-next/166372 "2009-04-24T15:15:56Z")

</div>

Hi, I’m facing a weird problem with jquery and ajax calls. I’ve a page which has a search box and also a listin which says “join”. Search uses Ajax calls. Join uses jquery call which opens a thickbox. for the first …

---

## [Links in rss comes with .rss ending in production mode, why?](https://www.ruby-forum.com/t/links-in-rss-comes-with-rss-ending-in-production-mode-why/166373)

<div class="topic-metadata">

**Author:** [@rafael](https://www.ruby-forum.com/u/rafael)\
**Replies:** 0\
**Last updated:** [April 24, 2009, 12:41pm UTC](https://www.ruby-forum.com/t/links-in-rss-comes-with-rss-ending-in-production-mode-why/166373 "2009-04-24T12:41:31Z")

</div>

Hey I’m facing the problem, that in development mode, the generation of the links in the RSS Feed is correct, but when they will be rendered in production mode (passenger 2.2.x) I recieve all link with the ending .rs…

---

## [Undefined method "redirect\_to" in before\_filter](https://www.ruby-forum.com/t/undefined-method-redirect-to-in-before-filter/166340)

<div class="topic-metadata">

**Author:** [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Replies:** 4\
**Last updated:** [April 24, 2009, 12:06pm UTC](https://www.ruby-forum.com/t/undefined-method-redirect-to-in-before-filter/166340 "2009-04-24T12:06:19Z")

</div>

Code sample: class SomeController \< ApplicationController before\_filter do |c| add\_crumb “Blah”, “/blah” #breadcrumbs plugin redirect\_to :controller =\> “foo”, :action =\> “bar” unless c.send (:has\_package?) end Res…

---

## [ApplicationController never fires](https://www.ruby-forum.com/t/applicationcontroller-never-fires/166369)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 4\
**Last updated:** [April 24, 2009, 11:28am UTC](https://www.ruby-forum.com/t/applicationcontroller-never-fires/166369 "2009-04-24T11:28:47Z")

</div>

Hello, I’m having a very strange problem, it seems that my application\_controller.rb never fires. I create a new rails for testing and I’m having the same problem, but I have other rails app that work perfectly, with…

---

## [Which Chapters from Agile Web will help me in Rails 3.0](https://www.ruby-forum.com/t/which-chapters-from-agile-web-will-help-me-in-rails-3-0/166362)

<div class="topic-metadata">

**Author:** [@rahil](https://www.ruby-forum.com/u/rahil)\
**Replies:** 2\
**Last updated:** [April 24, 2009, 11:14am UTC](https://www.ruby-forum.com/t/which-chapters-from-agile-web-will-help-me-in-rails-3-0/166362 "2009-04-24T11:14:43Z")

</div>

I am not so experienced when it comes to rails development. I have my own book " Agile Web D. with rails 3rd Edition " which covers Rails 2.2. I know many things have changed in Rails 2.3x and many would change again…

---

## [Need help with n\<-\>n authorization](https://www.ruby-forum.com/t/need-help-with-n-n-authorization/166194)

<div class="topic-metadata">

**Author:** [@patrick](https://www.ruby-forum.com/u/patrick)\
**Replies:** 1\
**Last updated:** [April 24, 2009, 11:08am UTC](https://www.ruby-forum.com/t/need-help-with-n-n-authorization/166194 "2009-04-24T11:08:14Z")

</div>

Hi folks, I’m trying to implement an authorization system with users, roles and permissions. Each user can have multiple roles, each role multiple permissions and users can have multiple ‘snowflake’ permissions as we…

---

## [RoR - getting started with database relations](https://www.ruby-forum.com/t/ror-getting-started-with-database-relations/166358)

<div class="topic-metadata">

**Author:** [@bradherman](https://www.ruby-forum.com/u/bradherman)\
**Replies:** 1\
**Last updated:** [April 24, 2009, 10:58am UTC](https://www.ruby-forum.com/t/ror-getting-started-with-database-relations/166358 "2009-04-24T10:58:50Z")

</div>

Hey everyone… I’m just getting my feet wet with relational databases using RoR models. The software I’m putting together relies on car parts. Originally I had the database set up as follows create\_table :parts do |t…

---

## [How to create associations with Factory Girl?](https://www.ruby-forum.com/t/how-to-create-associations-with-factory-girl/166368)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 0\
**Last updated:** [April 24, 2009, 10:54am UTC](https://www.ruby-forum.com/t/how-to-create-associations-with-factory-girl/166368 "2009-04-24T10:54:40Z")

</div>

I watched the RailsCasts episode on factory\_girl, and I’m trying to get out of fixtures. Does anybody know an open source project that uses many of the factory\_girls features? I came up with a pseudo code for possib…

---

## [Booked too many rooms for Railsconf](https://www.ruby-forum.com/t/booked-too-many-rooms-for-railsconf/166357)

<div class="topic-metadata">

**Author:** [@Marz](https://www.ruby-forum.com/u/Marz)\
**Replies:** 0\
**Last updated:** [April 24, 2009, 9:43am UTC](https://www.ruby-forum.com/t/booked-too-many-rooms-for-railsconf/166357 "2009-04-24T09:43:08Z")

</div>

Booked 4 Rooms we aren’t going to use, walking distance to the Conference. Four nights: Sunday 5-3-09 through Wednesday 5-6-09. Willing to let them go for about HALF the price of the Hilton. Call Martin at 760-237-405…

---

## [Linking a model to a specific user - RESTful Authentication](https://www.ruby-forum.com/t/linking-a-model-to-a-specific-user-restful-authentication/163700)

<div class="topic-metadata">

**Author:** [@vfgilber](https://www.ruby-forum.com/u/vfgilber)\
**Replies:** 17\
**Last updated:** [April 24, 2009, 9:29am UTC](https://www.ruby-forum.com/t/linking-a-model-to-a-specific-user-restful-authentication/163700 "2009-04-24T09:29:01Z")

</div>

Hi, I am having a really tough time figuring this out. I followed the tutorial below to add a RESTful authentication to a Ruby application that tracks projects (just a title and a url). The tutorial is for a blog, b…

---

## [NoMethodError](https://www.ruby-forum.com/t/nomethoderror/166291)

<div class="topic-metadata">

**Author:** [@joeyboy](https://www.ruby-forum.com/u/joeyboy)\
**Replies:** 5\
**Last updated:** [April 24, 2009, 7:45am UTC](https://www.ruby-forum.com/t/nomethoderror/166291 "2009-04-24T07:45:20Z")

</div>

hi! i was trying to run a rails based app, however i am stumped by the error as shown below. i get this kind of error everywhere. for example if i click on Company information, i would get this: NoMethodError in Admi…

---

## [Dealing with complex query by find\_by\_sql](https://www.ruby-forum.com/t/dealing-with-complex-query-by-find-by-sql/166276)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [April 24, 2009, 6:46am UTC](https://www.ruby-forum.com/t/dealing-with-complex-query-by-find-by-sql/166276 "2009-04-24T06:46:30Z")

</div>

Hi I have a query like sql = “SELECT count(DISTINCT r.id) as req\_count, round(SUM(h.assigned\_days)/count(DISTINCT r.id),1) as avg\_days,h.role\_id,EXTRACT(YEAR from r.created\_at)||’-’||EXTRACT(MONTH from r.created\_at)…

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

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