# Rails

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

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

---

## [Observe\_field, how to use input to toggle checkbox?](https://www.ruby-forum.com/t/observe-field-how-to-use-input-to-toggle-checkbox/186029)

<div class="topic-metadata">

**Author:** [@milo](https://www.ruby-forum.com/u/milo)\
**Replies:** 3\
**Last updated:** [April 1, 2010, 5:09pm UTC](https://www.ruby-forum.com/t/observe-field-how-to-use-input-to-toggle-checkbox/186029 "2010-04-01T17:09:29Z")

</div>

This may seem like a bit of a silly question, but here’s the reason: I have an app where a large number of options may need to be selected. Some are simply on/off with a checkbox but others have an additional text inp…

---

## [Module loading issue](https://www.ruby-forum.com/t/module-loading-issue/186124)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 2\
**Last updated:** [April 1, 2010, 4:51pm UTC](https://www.ruby-forum.com/t/module-loading-issue/186124 "2010-04-01T16:51:20Z")

</div>

Trying to keep things organized I created a directory under app called modules. In my env file I did what I did for my other directories: config.load\_paths += Dir\[ “#{RAILS\_ROOT}/app/modules/\*\*” \] Here is the top of …

---

## [Changing where ActiveRecord logs to in the console](https://www.ruby-forum.com/t/changing-where-activerecord-logs-to-in-the-console/186174)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 4:49pm UTC](https://www.ruby-forum.com/t/changing-where-activerecord-logs-to-in-the-console/186174 "2010-04-01T16:49:35Z")

</div>

G’day folks. In the Rails console, if you configure ActiveRecord’s logger to output to STDOUT, like this: ActiveRecord::Base.logger = Logger.new STDOUT how do you switch it back to writing to a file? I tried the 2 lin…

---

## [Migrations get out of synch with code - ideas?](https://www.ruby-forum.com/t/migrations-get-out-of-synch-with-code-ideas/186165)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [April 1, 2010, 4:03pm UTC](https://www.ruby-forum.com/t/migrations-get-out-of-synch-with-code-ideas/186165 "2010-04-01T16:03:40Z")

</div>

I just fell foul of a problem that i’ve encountered several times in the past and never really thought of a good solution. I wonder if there’s a solution out there for this. I just did some refactoring, moving Quiz#s…

---

## [Assigning values of an object when it is created based on mysql queries](https://www.ruby-forum.com/t/assigning-values-of-an-object-when-it-is-created-based-on-mysql-queries/186167)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 3\
**Last updated:** [April 1, 2010, 3:34pm UTC](https://www.ruby-forum.com/t/assigning-values-of-an-object-when-it-is-created-based-on-mysql-queries/186167 "2010-04-01T15:34:39Z")

</div>

I want to use a value entered in by a user in an object’s form to look up another value in a reference table and assign that value to the corresponding attribute in the object. How do I do that? Right now I have in m…

---

## [Loading a library before ActiveSupport](https://www.ruby-forum.com/t/loading-a-library-before-activesupport/186142)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 3\
**Last updated:** [April 1, 2010, 2:48pm UTC](https://www.ruby-forum.com/t/loading-a-library-before-activesupport/186142 "2010-04-01T14:48:59Z")

</div>

Is there any means for having an external library loaded before ActiveSupport is loaded when starting up a Rails app?

---

## [JOBS (Developers)](https://www.ruby-forum.com/t/jobs-developers/186162)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 1:38pm UTC](https://www.ruby-forum.com/t/jobs-developers/186162 "2010-04-01T13:38:46Z")

</div>

I am looking for a number of Ruby on Rails developers for web and mobile applications for an exciting new project based in the North West of England. If you are interested in either a contract or permanent position an…

---

## [Datamapper](https://www.ruby-forum.com/t/datamapper/186153)

<div class="topic-metadata">

**Author:** [@Carlos\_AndrSSSSs\_Ga](https://www.ruby-forum.com/u/Carlos_AndrSSSSs_Ga)\
**Replies:** 1\
**Last updated:** [April 1, 2010, 10:29am UTC](https://www.ruby-forum.com/t/datamapper/186153 "2010-04-01T10:29:09Z")

</div>

Im building a proyect, it is posible to integrate Datamapper with Ruby on Rails?

---

## [Getting Started with Rails - Encountered beginning problem](https://www.ruby-forum.com/t/getting-started-with-rails-encountered-beginning-problem/186154)

<div class="topic-metadata">

**Author:** [@Soulzityr](https://www.ruby-forum.com/u/Soulzityr)\
**Replies:** 2\
**Last updated:** [April 1, 2010, 10:13am UTC](https://www.ruby-forum.com/t/getting-started-with-rails-encountered-beginning-problem/186154 "2010-04-01T10:13:21Z")

</div>

Hello, I bought a book called “Head First Rails” and it’s great, starting off with giving me a few commands to instantly begin diving into learning Rails. However, I ran into a problem that I’m not quite sure how to f…

---

## [Date Conversion](https://www.ruby-forum.com/t/date-conversion/186135)

<div class="topic-metadata">

**Author:** [@Sav](https://www.ruby-forum.com/u/Sav)\
**Replies:** 1\
**Last updated:** [April 1, 2010, 10:05am UTC](https://www.ruby-forum.com/t/date-conversion/186135 "2010-04-01T10:05:44Z")

</div>

Can someone help me format the following date into a db-friendly datetime value? Here is the date I get from an XML file… xmldate = “2010-03-31T07:47:46 -500” But xmldate.to\_datetime isn’t handling the timezone… 201…

---

## [Problem With CGI::Session](https://www.ruby-forum.com/t/problem-with-cgi-session/186152)

<div class="topic-metadata">

**Author:** [@dhaval](https://www.ruby-forum.com/u/dhaval)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 9:13am UTC](https://www.ruby-forum.com/t/problem-with-cgi-session/186152 "2010-04-01T09:13:02Z")

</div>

Hi, I installed rails 2.3.5 and ruby 1.8.7 and downloaded the rfacebook plugin to create a simple facebook app and then when I ran some of the rake tasks I ran into problem like “undefined const CGI::Session” and whe…

---

## [Request format from jabber simple to openfire server](https://www.ruby-forum.com/t/request-format-from-jabber-simple-to-openfire-server/186146)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 7:41am UTC](https://www.ruby-forum.com/t/request-format-from-jabber-simple-to-openfire-server/186146 "2010-04-01T07:41:24Z")

</div>

Hi All, In order to enable chat functionality with gmail in my rails application i used “Jabber” and “xmpp4r/simple” and finished the chat functionality well and fine. Now i was asked to enable the chat functionality…

---

## [Dependency warning found on fresh rails 2.3.5 installation](https://www.ruby-forum.com/t/dependency-warning-found-on-fresh-rails-2-3-5-installation/185155)

<div class="topic-metadata">

**Author:** [@ct9a](https://www.ruby-forum.com/u/ct9a)\
**Replies:** 4\
**Last updated:** [April 1, 2010, 6:04am UTC](https://www.ruby-forum.com/t/dependency-warning-found-on-fresh-rails-2-3-5-installation/185155 "2010-04-01T06:04:36Z")

</div>

hi guys, I just installed rails 2.3.5 and ruby 1.9 on a new ubuntu karmic koala machine. For some silly reason, when I run “script/server”, I got the following warning… /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.…

---

## [Undefined method \`each' for "":String](https://www.ruby-forum.com/t/undefined-method-each-for-string/186118)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 5\
**Last updated:** [April 1, 2010, 3:44am UTC](https://www.ruby-forum.com/t/undefined-method-each-for-string/186118 "2010-04-01T03:44:43Z")

</div>

I implemented creating an object within another object according to this Railscast: but I’m getting this error after I submit. Any ideas? undefined method \`each’ for “”:String

---

## [Unbalanced brackets error](https://www.ruby-forum.com/t/unbalanced-brackets-error/186136)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [April 1, 2010, 2:51am UTC](https://www.ruby-forum.com/t/unbalanced-brackets-error/186136 "2010-04-01T02:51:27Z")

</div>

I’m getting unbalanced brackets and illegal nesting errors with this line of code: %html{ :lang =\> ‘en’, ‘xml:lang’ =\> ‘en’, :xmlns =\> ‘XHTML namespace’ } %head %script{:type =\> “text/javascript” $(document).ready(…

---

## [ActiveRecord's design allowing silent failure of object saves in associations](https://www.ruby-forum.com/t/activerecords-design-allowing-silent-failure-of-object-saves-in-associations/186134)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 0\
**Last updated:** [April 1, 2010, 12:17am UTC](https://www.ruby-forum.com/t/activerecords-design-allowing-silent-failure-of-object-saves-in-associations/186134 "2010-04-01T00:17:28Z")

</div>

I take issue with the faxt that in some cases ActiveRecord may automatically save records using “save” rather than “save!”. Specifically, this is when assigning an object to a “has\_one” relation, or adding an object …

---

## [RMagick, ImageMagick, Passenger and Dreamhost](https://www.ruby-forum.com/t/rmagick-imagemagick-passenger-and-dreamhost/167422)

<div class="topic-metadata">

**Author:** [@Daniel2Surf](https://www.ruby-forum.com/u/Daniel2Surf)\
**Replies:** 7\
**Last updated:** [March 31, 2010, 10:05pm UTC](https://www.ruby-forum.com/t/rmagick-imagemagick-passenger-and-dreamhost/167422 "2010-03-31T22:05:14Z")

</div>

I need to use the newest version of RMagick, so i did everything as they say on this wiki: http://wiki.dreamhost.com/index.php/RMagick But, my Rails app isn’t working, here is the error: This installation of RMagick w…

---

## [Unitialized constant](https://www.ruby-forum.com/t/unitialized-constant/186117)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [March 31, 2010, 9:54pm UTC](https://www.ruby-forum.com/t/unitialized-constant/186117 "2010-03-31T21:54:31Z")

</div>

I installed this plugin GitHub - loudpixel/highcharts-rails: A plugin for displaying Highcharts graphs in Rails and I put this code in my controller: def panels @ui\_panels = Highchart.pie({ :chart =\> { :renderTo =\> …

---

## [Advice on Search Design](https://www.ruby-forum.com/t/advice-on-search-design/186121)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 2\
**Last updated:** [March 31, 2010, 9:38pm UTC](https://www.ruby-forum.com/t/advice-on-search-design/186121 "2010-03-31T21:38:08Z")

</div>

I’ve been having problems submitting a question to this forum so sorry in advance if this is a repeat. I am not looking for code examples, just a pointer in the right direction as far as design. I am trying to do a s…

---

## [Rails3 parameters in routes](https://www.ruby-forum.com/t/rails3-parameters-in-routes/186123)

<div class="topic-metadata">

**Author:** [@hjblok](https://www.ruby-forum.com/u/hjblok)\
**Replies:** 0\
**Last updated:** [March 31, 2010, 9:08pm UTC](https://www.ruby-forum.com/t/rails3-parameters-in-routes/186123 "2010-03-31T21:08:23Z")

</div>

In Rails 2 I was able to specify extra parameters within a route, like this: map.login “login”, :controller =\> “user\_sessions”, :action =\> “new”, :tag\_index =\> true The tag\_index would be available in the controller …

---

## [Firebug Console window presents no Command line (\>\>\>\>)](https://www.ruby-forum.com/t/firebug-console-window-presents-no-command-line/186060)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 2\
**Last updated:** [March 31, 2010, 8:48pm UTC](https://www.ruby-forum.com/t/firebug-console-window-presents-no-command-line/186060 "2010-03-31T20:48:46Z")

</div>

Hi, I’m running Rails 2.3.5, Ruby 1.8.6, WinXP-Pro/SP3, Firefox 3.6.2, Firebug 1.5.3, MySQL 5.0.37-community-nt, Mongrel I have a toy .html file displayed in Firefox. When I press F12, a window opens at the bottom …

---

## [Object with many paperclip photos](https://www.ruby-forum.com/t/object-with-many-paperclip-photos/186037)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 4\
**Last updated:** [March 31, 2010, 8:34pm UTC](https://www.ruby-forum.com/t/object-with-many-paperclip-photos/186037 "2010-03-31T20:34:28Z")

</div>

I have an object that has multiple photos uploaded to it, using the paperclip plugin. I used a virtual attribute to have mutliple photos in the form but I can’t figure out how to get the image to save. It works if I…

---

## [Any body can help me ? why is this happen?](https://www.ruby-forum.com/t/any-body-can-help-me-why-is-this-happen/186072)

<div class="topic-metadata">

**Author:** [@anton\_effendi](https://www.ruby-forum.com/u/anton_effendi)\
**Replies:** 6\
**Last updated:** [March 31, 2010, 7:52pm UTC](https://www.ruby-forum.com/t/any-body-can-help-me-why-is-this-happen/186072 "2010-03-31T19:52:54Z")

</div>

Hii All I use ruby 1.8.7 I run irb and type: a = (0.29 \* 100).to\_i the result is 28 why??? could u explain to me… Please??? THank you – Senior Rails Developer Anton Effendi - Wu You Duan

---

## [Using Prawn in Rails 2.3.5](https://www.ruby-forum.com/t/using-prawn-in-rails-2-3-5/186078)

<div class="topic-metadata">

**Author:** [@yasser](https://www.ruby-forum.com/u/yasser)\
**Replies:** 1\
**Last updated:** [March 31, 2010, 7:51pm UTC](https://www.ruby-forum.com/t/using-prawn-in-rails-2-3-5/186078 "2010-03-31T19:51:44Z")

</div>

Hi I’m a big fan of Railscasts as I’ve been using them to further my learning in Ruby on Rails. I’m a student at Carnegie Mellon University and I’m having a problem with a gem that I have to use for my class project.…

---

## [Continue save after before\_update observer](https://www.ruby-forum.com/t/continue-save-after-before-update-observer/186090)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 1\
**Last updated:** [March 31, 2010, 7:43pm UTC](https://www.ruby-forum.com/t/continue-save-after-before-update-observer/186090 "2010-03-31T19:43:32Z")

</div>

Hi all, I have a before\_update observer method. But after that method is finished, it doesn’t proceed to ActiveRecord’s save method. What do I need to write in my before\_update observer method to make it proceed to t…

---

## [Undefined local variable or method \`request' â€”in test](https://www.ruby-forum.com/t/undefined-local-variable-or-method-request-a-in-test/186057)

<div class="topic-metadata">

**Author:** [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Replies:** 1\
**Last updated:** [March 31, 2010, 7:37pm UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method-request-a-in-test/186057 "2010-03-31T19:37:05Z")

</div>

I am working on a small gem patch… The code in question is in a module within /lib. I am calling request.env\[‘HTTP\_REFERER’\] and getting the desired results as implementation in the dev env. However, when I run my RSp…

---

## [Stop using Foo Bar!](https://www.ruby-forum.com/t/stop-using-foo-bar/186092)

<div class="topic-metadata">

**Author:** [@julescopeland](https://www.ruby-forum.com/u/julescopeland)\
**Replies:** 20\
**Last updated:** [March 31, 2010, 7:28pm UTC](https://www.ruby-forum.com/t/stop-using-foo-bar/186092 "2010-03-31T19:28:18Z")

</div>

Hi there, I’m teaching myself RoR, and I’ve found myself on this forum a fair few times when looking for solutions to problems. I’ve also found many other sites with help forums and tutorials as well. This may seem l…

---

## [Localize doesn't work](https://www.ruby-forum.com/t/localize-doesnt-work/183976)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 7\
**Last updated:** [March 31, 2010, 7:27pm UTC](https://www.ruby-forum.com/t/localize-doesnt-work/183976 "2010-03-31T19:27:09Z")

</div>

Hello, for some reason I18n.localize(Time.now, :format =\> :default) \[and l(Time.now, :format =\> :default)\] returns an empty string although t(’.text’) does work. Anyone knows what’s wrong with my I18n?

---

## [Problem saving object](https://www.ruby-forum.com/t/problem-saving-object/186071)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 4\
**Last updated:** [March 31, 2010, 7:16pm UTC](https://www.ruby-forum.com/t/problem-saving-object/186071 "2010-03-31T19:16:39Z")

</div>

I’m using the Cache-Money gem on this app, and I’m getting this weird error whenever I try to create a new object. Rails 2.3.5 ruby 1.8.7 (2008-08-11 patchlevel 72) \[x86\_64-linux\] NoMethodError (undefined method \`\<=\>’…

---

## [Undefined method \`abc\_notice\_path' for #\<ActionView::Base:0xed65220\>](https://www.ruby-forum.com/t/undefined-method-abc-notice-path-for-actionview-0xed65220/186081)

<div class="topic-metadata">

**Author:** [@gautam](https://www.ruby-forum.com/u/gautam)\
**Replies:** 3\
**Last updated:** [March 31, 2010, 6:21pm UTC](https://www.ruby-forum.com/t/undefined-method-abc-notice-path-for-actionview-0xed65220/186081 "2010-03-31T18:21:32Z")

</div>

Please help me in solving an issue. I wonder why i am getting this error. This method is defined in a controller which was generated through scaffolding and other functions that were created are working fine. Please …

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

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