# Rails

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

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

---

## [Problem with database still sqlite3 and i want mysql](https://www.ruby-forum.com/t/problem-with-database-still-sqlite3-and-i-want-mysql/189553)

<div class="topic-metadata">

**Author:** [@gezope](https://www.ruby-forum.com/u/gezope)\
**Replies:** 10\
**Last updated:** [June 6, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/problem-with-database-still-sqlite3-and-i-want-mysql/189553 "2010-06-06T17:20:50Z")

</div>

Hi all, I am a beginner developer on Rails. Unfortunately I have problems with the database connection for a week! I read many articles, but still not work properly. The problem: If I start a new Rails app, and I t…

---

## [Accessing form element on load](https://www.ruby-forum.com/t/accessing-form-element-on-load/189731)

<div class="topic-metadata">

**Author:** [@vijay](https://www.ruby-forum.com/u/vijay)\
**Replies:** 0\
**Last updated:** [June 6, 2010, 12:20pm UTC](https://www.ruby-forum.com/t/accessing-form-element-on-load/189731 "2010-06-06T12:20:35Z")

</div>

This is the form and link i have in html. \<%= link\_to\_function “sample”, “update\_timer()” %\> onload of the page, i was showing the timer the update\_timer() function. while the page gets loaded the script was call…

---

## [How to make an SQL querey Within a partial, is that possilbe?](https://www.ruby-forum.com/t/how-to-make-an-sql-querey-within-a-partial-is-that-possilbe/189725)

<div class="topic-metadata">

**Author:** [@happysmiley](https://www.ruby-forum.com/u/happysmiley)\
**Replies:** 2\
**Last updated:** [June 6, 2010, 11:54am UTC](https://www.ruby-forum.com/t/how-to-make-an-sql-querey-within-a-partial-is-that-possilbe/189725 "2010-06-06T11:54:51Z")

</div>

Hello, I’m quite new to Rails and english is even not my first language, so please excused nescience and clerical mistake. I’ll try to explain my problem as good as possible. I try to implement a page where a profil …

---

## [Now Hiring: Lead Developer/RoR in NYC](https://www.ruby-forum.com/t/now-hiring-lead-developer-ror-in-nyc/189728)

<div class="topic-metadata">

**Author:** [@PawLinks](https://www.ruby-forum.com/u/PawLinks)\
**Replies:** 0\
**Last updated:** [June 6, 2010, 11:49am UTC](https://www.ruby-forum.com/t/now-hiring-lead-developer-ror-in-nyc/189728 "2010-06-06T11:49:34Z")

</div>

We have an opening in NYC for a Lead Developer/RoR. See our listing here: Under Construction

---

## [Failure in model#new - I don't get it](https://www.ruby-forum.com/t/failure-in-model-new-i-dont-get-it/189718)

<div class="topic-metadata">

**Author:** [@chewmanfoo](https://www.ruby-forum.com/u/chewmanfoo)\
**Replies:** 1\
**Last updated:** [June 6, 2010, 11:48am UTC](https://www.ruby-forum.com/t/failure-in-model-new-i-dont-get-it/189718 "2010-06-06T11:48:59Z")

</div>

Here’s my error: NameError (undefined local variable or method \`gmap\_full\_address’ for #Class:0x7f9bae66e788): app/models/address.rb:12 here’s the model: class Address \< ActiveRecord::Base attr\_accessible :name, :a…

---

## [Test db is same as dev db and ask for sure: Yes/No?](https://www.ruby-forum.com/t/test-db-is-same-as-dev-db-and-ask-for-sure-yes-no/189719)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 0\
**Last updated:** [June 6, 2010, 5:49am UTC](https://www.ruby-forum.com/t/test-db-is-same-as-dev-db-and-ask-for-sure-yes-no/189719 "2010-06-06T05:49:35Z")

</div>

Is it feasible that when running unit test or functional test, when it detects that the “test” db is the same as the development db, then give a warning: are you sure? the whole db will be wiped cleaned - Yes/No. Bec…

---

## [Ajax fails in IE8](https://www.ruby-forum.com/t/ajax-fails-in-ie8/189653)

<div class="topic-metadata">

**Author:** [@ct9a](https://www.ruby-forum.com/u/ct9a)\
**Replies:** 6\
**Last updated:** [June 6, 2010, 5:00am UTC](https://www.ruby-forum.com/t/ajax-fails-in-ie8/189653 "2010-06-06T05:00:30Z")

</div>

hi guys, I am testing a new optional funtionality in my site with IE 8 after success with Firefox 3.6.3, chrome and safari. The new functionality basically sees a “sub category” drop down list get generated in my for…

---

## [Showing 404 page from controller in Rails 3](https://www.ruby-forum.com/t/showing-404-page-from-controller-in-rails-3/189440)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 8\
**Last updated:** [June 6, 2010, 2:45am UTC](https://www.ruby-forum.com/t/showing-404-page-from-controller-in-rails-3/189440 "2010-06-06T02:45:19Z")

</div>

Hi all, I want to be able to display 404 page from a controller when a record in the database can not be found. I am using Rails 3 at the moment. I tried to find how to do this on guides.rails.info with no luck. Can …

---

## [Submit\_to\_remote button names and method calls](https://www.ruby-forum.com/t/submit-to-remote-button-names-and-method-calls/189714)

<div class="topic-metadata">

**Author:** [@nhaberly](https://www.ruby-forum.com/u/nhaberly)\
**Replies:** 0\
**Last updated:** [June 6, 2010, 12:14am UTC](https://www.ruby-forum.com/t/submit-to-remote-button-names-and-method-calls/189714 "2010-06-06T00:14:48Z")

</div>

I have an HTML.erb file that defines 2 text\_area\_tags (input, output) and 3 submit\_to\_remote buttons (rewrite, demo, clear). Depending on which button is clicked, I’d like to call the corresponding Ruby method on the …

---

## [Newbie: Can't install plugins](https://www.ruby-forum.com/t/newbie-cant-install-plugins/189685)

<div class="topic-metadata">

**Author:** [@terhorst](https://www.ruby-forum.com/u/terhorst)\
**Replies:** 8\
**Last updated:** [June 5, 2010, 10:55pm UTC](https://www.ruby-forum.com/t/newbie-cant-install-plugins/189685 "2010-06-05T22:55:16Z")

</div>

Hi, I am totally new to Rails and am working in Windows (7 days from installing and haven’t programmed for 20 years prior to that!). I’ve been learning from various books, and have been trying to install plugins for …

---

## [Can Rails cache a Controller "as long as code not changed"?](https://www.ruby-forum.com/t/can-rails-cache-a-controller-as-long-as-code-not-changed/189645)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 5\
**Last updated:** [June 5, 2010, 4:36pm UTC](https://www.ruby-forum.com/t/can-rails-cache-a-controller-as-long-as-code-not-changed/189645 "2010-06-05T16:36:35Z")

</div>

At work, we have a situation where when script/server is run, then all the controller code is cached. This is to speed up the development server. But that will mean that whenever we change the controller code, we n…

---

## [Ruby Code Return](https://www.ruby-forum.com/t/ruby-code-return/189693)

<div class="topic-metadata">

**Author:** [@Srinivas\_G](https://www.ruby-forum.com/u/Srinivas_G)\
**Replies:** 4\
**Last updated:** [June 5, 2010, 1:14pm UTC](https://www.ruby-forum.com/t/ruby-code-return/189693 "2010-06-05T13:14:04Z")

</div>

What will this Ruby code return? answer = “runthisnafleogw” p answer\[0…2\] p answer\[3…6\] p answer\[5…5\]+answer\[7…7\] p answer\[8…8\] p answer\[9…9\]+answer\[5…5\]+answer\[10…11\] p answer\[3…3\]+answer\[12…12\] p answer\[13…13\]+…

---

## [Error Ruby Code](https://www.ruby-forum.com/t/error-ruby-code/189690)

<div class="topic-metadata">

**Author:** [@Srinivas\_G](https://www.ruby-forum.com/u/Srinivas_G)\
**Replies:** 2\
**Last updated:** [June 5, 2010, 1:12pm UTC](https://www.ruby-forum.com/t/error-ruby-code/189690 "2010-06-05T13:12:19Z")

</div>

Explain the error in the following sample of Ruby code. Reference the line which the error is found on: 1- my\_grade = “A+” 2- 3- if my\_grade = “A+” 4- puts “PASSED!!!” 5- end

---

## [Function Ruy Code](https://www.ruby-forum.com/t/function-ruy-code/189691)

<div class="topic-metadata">

**Author:** [@Srinivas\_G](https://www.ruby-forum.com/u/Srinivas_G)\
**Replies:** 0\
**Last updated:** [June 5, 2010, 11:26am UTC](https://www.ruby-forum.com/t/function-ruy-code/189691 "2010-06-05T11:26:57Z")

</div>

Explain the error in the following sample of Ruby code. Reference the line which the error is found on: 1- function effective\_date(eff\_date) 2- if eff\_date.length \< 3 3- eff\_date = Time.now + (eff\_date.to\_i \* …

---

## [Table query](https://www.ruby-forum.com/t/table-query/189688)

<div class="topic-metadata">

**Author:** [@Srinivas\_G](https://www.ruby-forum.com/u/Srinivas_G)\
**Replies:** 0\
**Last updated:** [June 5, 2010, 10:45am UTC](https://www.ruby-forum.com/t/table-query/189688 "2010-06-05T10:45:24Z")

</div>

Write a table query that pulls records from the table ‘Teacher’ when the ‘name’ field is ‘Robert’.

---

## [Ruby breakpoint has weird idea of what local\_variables are?](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 6\
**Last updated:** [June 5, 2010, 1:34am UTC](https://www.ruby-forum.com/t/ruby-breakpoint-has-weird-idea-of-what-local-variables-are/189410 "2010-06-05T01:34:40Z")

</div>

Hi, I’ve got a 7-liner: require ‘rubygems’ require ‘breakpoint’ a = ‘aaa’ b = ‘bbb’ breakpoint c = ‘ccc’ In a Command window, I’ve got: K:\_Projects\\Ruby\_Ruby\_Tests\\TestBreakpoint\>ruby TestBreakpoint.rb Executin…

---

## [Problems with Ruby on Rails and Mechanize gem?](https://www.ruby-forum.com/t/problems-with-ruby-on-rails-and-mechanize-gem/189680)

<div class="topic-metadata">

**Author:** [@jorgegetafe](https://www.ruby-forum.com/u/jorgegetafe)\
**Replies:** 0\
**Last updated:** [June 5, 2010, 12:39am UTC](https://www.ruby-forum.com/t/problems-with-ruby-on-rails-and-mechanize-gem/189680 "2010-06-05T00:39:53Z")

</div>

Hi all. I’m doing a web site using “WWW::Mechanize”. From my application, when I’m using the web site, I have a link, and when I make click on the Iink, I want to log with my google mail, this already works but now, …

---

## [New to rails, a little model help please](https://www.ruby-forum.com/t/new-to-rails-a-little-model-help-please/189679)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 4\
**Last updated:** [June 5, 2010, 12:30am UTC](https://www.ruby-forum.com/t/new-to-rails-a-little-model-help-please/189679 "2010-06-05T00:30:16Z")

</div>

Hey guys I’m having a little trouble what I think should be a pretty simple relationship between tables. Player.rating is a f-key to Rating.id, both fields are integers When I try to add a new player I get this error …

---

## [Ajax, jQuery](https://www.ruby-forum.com/t/ajax-jquery/189676)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 2\
**Last updated:** [June 4, 2010, 11:16pm UTC](https://www.ruby-forum.com/t/ajax-jquery/189676 "2010-06-04T23:16:54Z")

</div>

I am not sure where I should post this since this seems to be an “interdisciplinary” problem I am having trouble communicating between my javascript and my Rails app. Here’s the snipped of code from my controller d…

---

## [Free Webinar! Using Cucumber + Webrat to Test Ruby Apps in the Cloud](https://www.ruby-forum.com/t/free-webinar-using-cucumber-webrat-to-test-ruby-apps-in-the-cloud/189674)

<div class="topic-metadata">

**Author:** [@Ashley](https://www.ruby-forum.com/u/Ashley)\
**Replies:** 0\
**Last updated:** [June 4, 2010, 11:15pm UTC](https://www.ruby-forum.com/t/free-webinar-using-cucumber-webrat-to-test-ruby-apps-in-the-cloud/189674 "2010-06-04T23:15:13Z")

</div>

Thursday, June 15, 2010 at 11 am PDT Register here: http://bit.ly/abJDuC Cucumber, a Ruby on Rails tool, is incredibly useful for the full- stack testing of web applications. Using domain-specific language that reads…

---

## [Alternative to ActiveRecord for populating model objects?](https://www.ruby-forum.com/t/alternative-to-activerecord-for-populating-model-objects/189665)

<div class="topic-metadata">

**Author:** [@safny](https://www.ruby-forum.com/u/safny)\
**Replies:** 14\
**Last updated:** [June 4, 2010, 10:53pm UTC](https://www.ruby-forum.com/t/alternative-to-activerecord-for-populating-model-objects/189665 "2010-06-04T22:53:37Z")

</div>

Hi, We are using Ruby on Rails for an internal project. The data for our model objects exists in many different data sources (database, mainframe, etc), so we we need to avoid using ActiveRecord. Our development team…

---

## [Sqlite specified in database.yml, rails tries to use mysql](https://www.ruby-forum.com/t/sqlite-specified-in-database-yml-rails-tries-to-use-mysql/189670)

<div class="topic-metadata">

**Author:** [@lpeabody](https://www.ruby-forum.com/u/lpeabody)\
**Replies:** 2\
**Last updated:** [June 4, 2010, 9:10pm UTC](https://www.ruby-forum.com/t/sqlite-specified-in-database-yml-rails-tries-to-use-mysql/189670 "2010-06-04T21:10:09Z")

</div>

Hi All, I’ve run into an interesting (and annoying) problem. I have a development environment on a Windows machine and on a remote Linux machine. I cloned my environment on the Linux machine over to my Windows box.…

---

## [Embedding a form is lots of various place](https://www.ruby-forum.com/t/embedding-a-form-is-lots-of-various-place/189673)

<div class="topic-metadata">

**Author:** [@theduz](https://www.ruby-forum.com/u/theduz)\
**Replies:** 0\
**Last updated:** [June 4, 2010, 9:04pm UTC](https://www.ruby-forum.com/t/embedding-a-form-is-lots-of-various-place/189673 "2010-06-04T21:04:40Z")

</div>

Hi, I’ve been asked to put a ‘contact us’ form in many and various places on our site. Initially, I proposed we simply link to the contact us form, which is already handled by a model, view and controller, but the u…

---

## [Ajax post from a mobile app](https://www.ruby-forum.com/t/ajax-post-from-a-mobile-app/189672)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 0\
**Last updated:** [June 4, 2010, 8:44pm UTC](https://www.ruby-forum.com/t/ajax-post-from-a-mobile-app/189672 "2010-06-04T20:44:58Z")

</div>

Hi, I’m a trying to create a user using Ajax from a mobile app with javascript and I’m struggling!!! Here is what I’m trying: user = {username:‘plop’, password:‘plip’, password\_confirmation:‘plip’}; new Ajax.Updater…

---

## [Regular expression](https://www.ruby-forum.com/t/regular-expression/189654)

<div class="topic-metadata">

**Author:** [@Srinivas\_G](https://www.ruby-forum.com/u/Srinivas_G)\
**Replies:** 6\
**Last updated:** [June 4, 2010, 8:17pm UTC](https://www.ruby-forum.com/t/regular-expression/189654 "2010-06-04T20:17:50Z")

</div>

Can u help me in simple regular expression that will match the string ‘123\_456\_7890’ but not ‘123\_456\_789’.

---

## [How to show a Timer for lock expiry when editing a record](https://www.ruby-forum.com/t/how-to-show-a-timer-for-lock-expiry-when-editing-a-record/189657)

<div class="topic-metadata">

**Author:** [@vijay](https://www.ruby-forum.com/u/vijay)\
**Replies:** 1\
**Last updated:** [June 4, 2010, 8:03pm UTC](https://www.ruby-forum.com/t/how-to-show-a-timer-for-lock-expiry-when-editing-a-record/189657 "2010-06-04T20:03:10Z")

</div>

I’m newbie to ruby on rails. In my application, i was trying to show the remaining time the user is allowed to edit an instance record( like milestones, cheklists etc.). I was locking it from multiple users to edit it…

---

## [Integrum is Hiring!](https://www.ruby-forum.com/t/integrum-is-hiring/189667)

<div class="topic-metadata">

**Author:** [@Chris\_Conrey](https://www.ruby-forum.com/u/Chris_Conrey)\
**Replies:** 0\
**Last updated:** [June 4, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/integrum-is-hiring/189667 "2010-06-04T18:24:16Z")

</div>

We’re growing again at Integrum. With a stable of long term clients and growth in the mobile development side as well, we’re looking to bring in some more talented developers to our team. We’re currently looking for…

---

## [How to specify which database we're using?](https://www.ruby-forum.com/t/how-to-specify-which-database-were-using/189659)

<div class="topic-metadata">

**Author:** [@Ramos](https://www.ruby-forum.com/u/Ramos)\
**Replies:** 3\
**Last updated:** [June 4, 2010, 5:39pm UTC](https://www.ruby-forum.com/t/how-to-specify-which-database-were-using/189659 "2010-06-04T17:39:12Z")

</div>

I am seeding my environment for testing, but I am doing it upon my development environment, and in fact I’d like to seed my test environment… How can I do that?

---

## [Running Application](https://www.ruby-forum.com/t/running-application/189658)

<div class="topic-metadata">

**Author:** [@anon\_comp](https://www.ruby-forum.com/u/anon_comp)\
**Replies:** 8\
**Last updated:** [June 4, 2010, 4:56pm UTC](https://www.ruby-forum.com/t/running-application/189658 "2010-06-04T16:56:27Z")

</div>

I’m getting an error message when I try to run my application (ruby script/server), normally I’d hit “OK” and the application would run without issues, but now it has completely failed to deploy. I’m running on Window…

---

## [Click the address to display google map](https://www.ruby-forum.com/t/click-the-address-to-display-google-map/189513)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 3\
**Last updated:** [June 4, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/click-the-address-to-display-google-map/189513 "2010-06-04T16:44:10Z")

</div>

hi My app has location for every user,i want the location to display a little google map in a way like ajax when clicking the location? I am a javascript and google map api idiot,can you help me? is there any tutoria…

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

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