# Rails

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

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

---

## [Class methods from module where active rec is involved](https://www.ruby-forum.com/t/class-methods-from-module-where-active-rec-is-involved/190219)

<div class="topic-metadata">

**Author:** [@Jedrin](https://www.ruby-forum.com/u/Jedrin)\
**Replies:** 2\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/class-methods-from-module-where-active-rec-is-involved/190219 "2010-06-17T16:22:36Z")

</div>

I have a module as shown below and when I extend an active record to use it, I can not access the primary\_key method. In a simple test program using a similar approach where active record is not involved, access to th…

---

## ["NoMethodError in AdminController#index" error](https://www.ruby-forum.com/t/nomethoderror-in-admincontroller-index-error/190092)

<div class="topic-metadata">

**Author:** [@hormoz](https://www.ruby-forum.com/u/hormoz)\
**Replies:** 7\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/nomethoderror-in-admincontroller-index-error/190092 "2010-06-17T16:22:35Z")

</div>

hi, im totally a newbie so i have got no idea whatsoever why i got this error, the thing that happend was i was doing a little coding along with the lynda.com rails series that i got this error. well as u can see this…

---

## [Irb problem](https://www.ruby-forum.com/t/irb-problem/190170)

<div class="topic-metadata">

**Author:** [@radu\_puspana](https://www.ruby-forum.com/u/radu_puspana)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/irb-problem/190170 "2010-06-17T16:22:35Z")

</div>

Hi guys, can you spare some time? i have this irb problem…when i try to enter this line : def show\_text text the irb gives me this error No command ‘def’ found, did you mean: Command ‘df’ from package ‘coreutils’ (m…

---

## [How to run nifty generators in rails 3.0](https://www.ruby-forum.com/t/how-to-run-nifty-generators-in-rails-3-0/190237)

<div class="topic-metadata">

**Author:** [@kirankinuforu](https://www.ruby-forum.com/u/kirankinuforu)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/how-to-run-nifty-generators-in-rails-3-0/190237 "2010-06-17T16:22:35Z")

</div>

Dear all, I want to run nifty generators in\* Rails 3.0\* but it not accepts. Please send me the information,Please send me the commands for authentication Thanks

---

## [Problem submiting value, form\_for, link-to-remote, javascrip](https://www.ruby-forum.com/t/problem-submiting-value-form-for-link-to-remote-javascrip/190074)

<div class="topic-metadata">

**Author:** [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Replies:** 3\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/problem-submiting-value-form-for-link-to-remote-javascrip/190074 "2010-06-17T16:22:34Z")

</div>

This is my form. It creates a comment in the database but won’t pass the ‘body’ value. I think the problem is passing the variable to javascript. Can anyone help? \<% form\_for :comment, :url=\>story\_comments\_path(@story)…

---

## [Using XmlSimple to parse XML strings](https://www.ruby-forum.com/t/using-xmlsimple-to-parse-xml-strings/190169)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/using-xmlsimple-to-parse-xml-strings/190169 "2010-06-17T16:22:33Z")

</div>

I am using XmlSimple to parse an XML string received from a remote host. I am getting the error message, “File does not exist: .”. I am fairly well convinced that the problem is that XmlSimple is not recognizing the…

---

## [Dropdown onchange event?](https://www.ruby-forum.com/t/dropdown-onchange-event/190026)

<div class="topic-metadata">

**Author:** [@sindrig](https://www.ruby-forum.com/u/sindrig)\
**Replies:** 7\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/dropdown-onchange-event/190026 "2010-06-17T16:22:31Z")

</div>

Hi, I have a dropdown menu which shows the categories available. When a user selects one I want the browser to redirect to the selected category. I now have this code I found on stackoverflow; \<%form\_for :cat\_form, :…

---

## [ajax.Autocompleter not working in Rails 3](https://www.ruby-forum.com/t/ajax-autocompleter-not-working-in-rails-3/190238)

<div class="topic-metadata">

**Author:** [@pconnordctt](https://www.ruby-forum.com/u/pconnordctt)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/ajax-autocompleter-not-working-in-rails-3/190238 "2010-06-17T16:22:28Z")

</div>

I have spent most of today trying to make the ajax.Autocompleter work in a Rails 3 application. To this point, I can get the autocompleter.local to work, but not the AJAX version. The View: = form\_for \[:admin, @cont…

---

## [:wrapper\_tag, :wrapper\_class options (and more) with simple\_form and Rails 2.3?](https://www.ruby-forum.com/t/wrapper-tag-wrapper-class-options-and-more-with-simple-form-and-rails-2-3/190215)

<div class="topic-metadata">

**Author:** [@Fro\_oo](https://www.ruby-forum.com/u/Fro_oo)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/wrapper-tag-wrapper-class-options-and-more-with-simple-form-and-rails-2-3/190215 "2010-06-17T16:22:22Z")

</div>

Hi, I’m making my first Rails project and I’m using the simple\_form gem (version 1.0) with a Rails app (version 2.3.5). simple\_form repository v=1.0 Is there any way to implement the nice options :wrapper\_tag, :wrap…

---

## [Barry Flower is out of the office](https://www.ruby-forum.com/t/barry-flower-is-out-of-the-office/190212)

<div class="topic-metadata">

**Author:** [@Barry\_Flower](https://www.ruby-forum.com/u/Barry_Flower)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/barry-flower-is-out-of-the-office/190212 "2010-06-17T16:22:22Z")

</div>

I will be out of the office starting 15/06/2010 and will not return until 16/06/2010. I will be accessing my mail from time to time but for urgent issues please contact Kiran Joshi (IT Issues) or Adam Brand (Busine…

---

## [Form select not saving to the database](https://www.ruby-forum.com/t/form-select-not-saving-to-the-database/190114)

<div class="topic-metadata">

**Author:** [@thebarge](https://www.ruby-forum.com/u/thebarge)\
**Replies:** 5\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/form-select-not-saving-to-the-database/190114 "2010-06-17T16:22:22Z")

</div>

\<%= f.label :type %\> \<%= f.select(:type, \[“original”,“print”,“other”\]) %\> I have a photos model and added a drop-down list to the form, when the option is selected, the correct parameters are passed but it is not sav…

---

## [Can't run rake with rails3.0.0beta4- problem with bundler, i think](https://www.ruby-forum.com/t/cant-run-rake-with-rails3-0-0beta4-problem-with-bundler-i-think/190208)

<div class="topic-metadata">

**Author:** [@loominator1970](https://www.ruby-forum.com/u/loominator1970)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/cant-run-rake-with-rails3-0-0beta4-problem-with-bundler-i-think/190208 "2010-06-17T16:22:20Z")

</div>

Hello, Anyone else running into this same problem? I’ve come across some posts on the subject, but none have helped Installed: rails 3.0.0beta4 bundler 0.9.26 ruby 1.9.1 rake 0.8.7 After creating an initial rail…

---

## [Rails won't execute backticked OS commands](https://www.ruby-forum.com/t/rails-wont-execute-backticked-os-commands/190148)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/rails-wont-execute-backticked-os-commands/190148 "2010-06-17T16:22:20Z")

</div>

I’m at a loss as what to look for… I can issue a command result = some\_os\_command\_string on my dev system just fine in both a pur ruby test file, and from Rails in dev mode. When I push that code to my server, the bac…

---

## [ARel table aliases](https://www.ruby-forum.com/t/arel-table-aliases/190207)

<div class="topic-metadata">

**Author:** [@Pat\_Allan](https://www.ruby-forum.com/u/Pat_Allan)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/arel-table-aliases/190207 "2010-06-17T16:22:20Z")

</div>

Hi all I’m battling a little with Rails 3 - trying to get Thinking Sphinx working with it. What I need is some way to interrogate ARel joins to find out table aliases, given a certain association hierarchy. For examp…

---

## [Redirect\_to :controller=\>'tips', :action =\> 'show'](https://www.ruby-forum.com/t/redirect-to-controller-tips-action-show/190046)

<div class="topic-metadata">

**Author:** [@johnuseast](https://www.ruby-forum.com/u/johnuseast)\
**Replies:** 2\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/redirect-to-controller-tips-action-show/190046 "2010-06-17T16:22:19Z")

</div>

hi, I tried to redirect rails to show action by passing controller, action, and params. However, rails ignores the name of action totally! what I got is http://mysite/controllername/paramId so i have error message… h…

---

## [Beta 4 and Modularized::Controllers](https://www.ruby-forum.com/t/beta-4-and-modularized-controllers/190202)

<div class="topic-metadata">

**Author:** [@yuri](https://www.ruby-forum.com/u/yuri)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/beta-4-and-modularized-controllers/190202 "2010-06-17T16:22:19Z")

</div>

Seems that in beta 4 and master, a route defined in a namespace :foo, or with controller: ‘foo/bar’, or with scope module: ‘foo’ always nets one: ‘wrong constant name Foo/barController’. Did the ways of setting up rou…

---

## [Stylesheet\_link\_tag](https://www.ruby-forum.com/t/stylesheet-link-tag/190090)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 2\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/stylesheet-link-tag/190090 "2010-06-17T16:22:18Z")

</div>

I know that the following statement loads the scaffold stylesheet, but what exactly does stylesheet\_link\_tag do here? \<%= stylesheet\_link\_tag ‘scaffold’ %\> Thanks.

---

## [Modifying an association during inheritance](https://www.ruby-forum.com/t/modifying-an-association-during-inheritance/190201)

<div class="topic-metadata">

**Author:** [@kampers](https://www.ruby-forum.com/u/kampers)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/modifying-an-association-during-inheritance/190201 "2010-06-17T16:22:18Z")

</div>

I have a Team class that inherits from a Group class. Both Team and Groups have memberships through the same association. However, I need to run a method after a Team memberships is added but not a Group. I current…

---

## [Rake tells me to install gems that are already there](https://www.ruby-forum.com/t/rake-tells-me-to-install-gems-that-are-already-there/189861)

<div class="topic-metadata">

**Author:** [@ali](https://www.ruby-forum.com/u/ali)\
**Replies:** 3\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/rake-tells-me-to-install-gems-that-are-already-there/189861 "2010-06-17T16:22:17Z")

</div>

Hi, I’ve on hostmonster.com and i’ve run into a small problem that I just can’t get. When I push my application into my hosting environment and try to run rake db:migrate, I get an error message from rake telling me t…

---

## [Different each iteration](https://www.ruby-forum.com/t/different-each-iteration/190122)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 5\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/different-each-iteration/190122 "2010-06-17T16:22:16Z")

</div>

Hi, I’ve read a few days ago that rails has a each method that allows you to speficy the number of iteration. I think the default number was 1000. What is the name of the method? myList.each\_with\_something or myList.…

---

## [Running a long process (perhaps it's in an infinite loop) - troubleshooting](https://www.ruby-forum.com/t/running-a-long-process-perhaps-its-in-an-infinite-loop-troubleshooting/190186)

<div class="topic-metadata">

**Author:** [@chewmanfoo](https://www.ruby-forum.com/u/chewmanfoo)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/running-a-long-process-perhaps-its-in-an-infinite-loop-troubleshooting/190186 "2010-06-17T16:22:15Z")

</div>

Guys, I added an address search function in an after\_save on my Address model. When you key in an address in the form, it tries to look up the latitude, longitude using geocoding, and fill in two fields (:lat, :long…

---

## [Syntax error, unexpected kEND, expecting $end](https://www.ruby-forum.com/t/syntax-error-unexpected-kend-expecting-end/190177)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/syntax-error-unexpected-kend-expecting-end/190177 "2010-06-17T16:22:14Z")

</div>

I get this error /Users/sopira/rubydev/hello/app/models/spracovatel.rb:5: syntax error, unexpected kEND, expecting $end on the 5th line of the code, which has got just (and only) 5 line: CODE: Class Spracovatel def…

---

## [How to integrate NING login in my website](https://www.ruby-forum.com/t/how-to-integrate-ning-login-in-my-website/190179)

<div class="topic-metadata">

**Author:** [@Amal\_Kumar](https://www.ruby-forum.com/u/Amal_Kumar)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/how-to-integrate-ning-login-in-my-website/190179 "2010-06-17T16:22:12Z")

</div>

Hi, Has anyone implemented NING login. Is there any API for this, I googled a lot but couldn’t find a solution for this. could anyone provide some sample code or something like that. Note: I need to login with NIng …

---

## [Sockets are Killing Me!](https://www.ruby-forum.com/t/sockets-are-killing-me/190176)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/sockets-are-killing-me/190176 "2010-06-17T16:22:11Z")

</div>

I’ve been trying to interface to the onlineNIC API which uses sockets. The following 4 lines of test code illustrate my problem: socket=TCPSocket::new(‘ip’,‘port’) puts(“Connect:\\n”+socket.read()+"\\n\\n") socket.prin…

---

## [Rails & ImageMagick CLI Backticks](https://www.ruby-forum.com/t/rails-imagemagick-cli-backticks/190084)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/rails-imagemagick-cli-backticks/190084 "2010-06-17T16:22:09Z")

</div>

Rails 2.3.2, OSX 10.5.8, Ruby 1.8.6 (p369), IM 6.5.0 I have my own class to run IM commands via classic Ruby CLI backticks. Works perfect on my dev system in both dev and prod modes. On my server, I can’t get any IM c…

---

## [Permalink generator](https://www.ruby-forum.com/t/permalink-generator/190120)

<div class="topic-metadata">

**Author:** [@ialuronico](https://www.ruby-forum.com/u/ialuronico)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/permalink-generator/190120 "2010-06-17T16:22:09Z")

</div>

Hi everybody I’m looking for a good permalink generator similar to this one http://cubiq.org/the-perfect-php-clean-url-generator (but this is PHP) I found this gem that looks like is doing what i need , http://rubyge…

---

## [Ruby on Rails Analyst/Programmers, Glasgow](https://www.ruby-forum.com/t/ruby-on-rails-analyst-programmers-glasgow/190126)

<div class="topic-metadata">

**Author:** [@dshell](https://www.ruby-forum.com/u/dshell)\
**Replies:** 5\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-analyst-programmers-glasgow/190126 "2010-06-17T16:22:08Z")

</div>

Hi All, I would like your advice. I’m helping a young company set up a ROR team from entry level to Senior A/P. I’ve not worked with this tech before so have some basic questions. What are your thoughts: Is this a …

---

## [Why SuperInPlaceControls doesn't Save in partials?](https://www.ruby-forum.com/t/why-superinplacecontrols-doesnt-save-in-partials/190159)

<div class="topic-metadata">

**Author:** [@sss](https://www.ruby-forum.com/u/sss)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/why-superinplacecontrols-doesnt-save-in-partials/190159 "2010-06-17T16:22:04Z")

</div>

Hi, Does anyone know why if I use SuperInPlaceControls in partial, the editing doesn’t work? I can start editing but when I click ‘Ok’ the application is saying “Saving…”, however once it’s done it doesn’t display an…

---

## [Problem with options\_for\_select](https://www.ruby-forum.com/t/problem-with-options-for-select/190153)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 11:19am UTC](https://www.ruby-forum.com/t/problem-with-options-for-select/190153 "2010-06-17T11:19:19Z")

</div>

Hi, I have a problem with the form select. In the value field I have the generated html… \<%= f.select :brand\_id, options\_for\_select(\[\[‘Brands’, 0\]\] + @search\_brands.map { |b| \[b.name, b.id\]}), {:id =\> ‘cbxBrand’, :…

---

## [Delete stale sessions in ror web application](https://www.ruby-forum.com/t/delete-stale-sessions-in-ror-web-application/190149)

<div class="topic-metadata">

**Author:** [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 9:47am UTC](https://www.ruby-forum.com/t/delete-stale-sessions-in-ror-web-application/190149 "2010-06-17T09:47:31Z")

</div>

hi, in my webapplication, user logins into application. i want to delete the stale sessions. and while before deleting the stale session auomatically i need perform on some operations on database. how to do this Rega…

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

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