# Rails

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

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

---

## [Require not working](https://www.ruby-forum.com/t/require-not-working/105812)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [June 3, 2007, 9:18am UTC](https://www.ruby-forum.com/t/require-not-working/105812 "2007-06-03T09:18:23Z")

</div>

Hi, I installed the require ruby gems and it is there in the lib directory … but when i tried to call it using require its not working with irb: i tired require ‘rubygems’ its throwing me false and for require ‘scr…

---

## [Validates\_uniqueness\_of AND join tables](https://www.ruby-forum.com/t/validates-uniqueness-of-and-join-tables/105808)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 1\
**Last updated:** [June 3, 2007, 8:45am UTC](https://www.ruby-forum.com/t/validates-uniqueness-of-and-join-tables/105808 "2007-06-03T08:45:39Z")

</div>

I have organizations and individuals. Both of these can have multiply urls, emails, addresses or phones…so I have used a join table. I also have codes - WK - work, HM - Home…etc. I need to validate that an individu…

---

## [RESTFul nested resources 3 levels](https://www.ruby-forum.com/t/restful-nested-resources-3-levels/105786)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [June 3, 2007, 7:52am UTC](https://www.ruby-forum.com/t/restful-nested-resources-3-levels/105786 "2007-06-03T07:52:52Z")

</div>

I can write the correct route for 2 levels cities has\_many areas map.resources :cities do |cities| cities.resources :areas, :member =\> { :network =\> :get } end whatif I need a 3rd level : areas has\_many domains …

---

## [Ajax list removal](https://www.ruby-forum.com/t/ajax-list-removal/105800)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 2\
**Last updated:** [June 3, 2007, 6:21am UTC](https://www.ruby-forum.com/t/ajax-list-removal/105800 "2007-06-03T06:21:12Z")

</div>

I have a list of objects that are in a table. Each row of the table contains the elements of one object. The rows have dynamically generated id’s based on the object. I’ve created a destroy method for these objects,…

---

## [Rspec\_on\_rails oddity](https://www.ruby-forum.com/t/rspec-on-rails-oddity/105806)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 1\
**Last updated:** [June 3, 2007, 5:37am UTC](https://www.ruby-forum.com/t/rspec-on-rails-oddity/105806 "2007-06-03T05:37:11Z")

</div>

Thanks to everyone in advance that can help me here. I am using the rspec and rspec\_on\_rails plugins (http://rspec.rubyforge.org/ documentation/rails/index.html) and have my tests in spec folder. The odd thing is is t…

---

## [JS Form Validation](https://www.ruby-forum.com/t/js-form-validation/105803)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 1\
**Last updated:** [June 3, 2007, 3:50am UTC](https://www.ruby-forum.com/t/js-form-validation/105803 "2007-06-03T03:50:04Z")

</div>

Suppose that I use Rails to create an HTML form element. By that I mean that I have some Ruby code that I call from within \<%= %\> and the Ruby code then generates the form element for me. So what actually gets stuc…

---

## [Server-side Image Maps in Rails](https://www.ruby-forum.com/t/server-side-image-maps-in-rails/105773)

<div class="topic-metadata">

**Author:** [@jballanc](https://www.ruby-forum.com/u/jballanc)\
**Replies:** 2\
**Last updated:** [June 3, 2007, 1:55am UTC](https://www.ruby-forum.com/t/server-side-image-maps-in-rails/105773 "2007-06-03T01:55:58Z")

</div>

I’ve been working on an idea to use a server-side image map to allow users to click anywhere in an area and have a new element appear at the location they clicked. Everything was going well, until it came time to conn…

---

## [How to do Daily Database Maintenance in a Rails Way?](https://www.ruby-forum.com/t/how-to-do-daily-database-maintenance-in-a-rails-way/105769)

<div class="topic-metadata">

**Author:** [@newbie](https://www.ruby-forum.com/u/newbie)\
**Replies:** 4\
**Last updated:** [June 3, 2007, 1:27am UTC](https://www.ruby-forum.com/t/how-to-do-daily-database-maintenance-in-a-rails-way/105769 "2007-06-03T01:27:56Z")

</div>

I am learning Rails and came across the following problem. I need to do some daily maintenance to the MySQL database. By maintenance, I mean reading data from one table, do some calculation, and put the result in anot…

---

## [Weird results i'm getting please explain](https://www.ruby-forum.com/t/weird-results-im-getting-please-explain/105787)

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 3\
**Last updated:** [June 3, 2007, 1:11am UTC](https://www.ruby-forum.com/t/weird-results-im-getting-please-explain/105787 "2007-06-03T01:11:55Z")

</div>

Hi, This is kind of weird thing, I cannot explain it, but I will show you my code - this would explain it better. I have a helper method: def month\_in\_words(month) logger.debug(month) Time.parse(month).strftime("%b…

---

## [Polymorphic associations. Agile rails book confusion](https://www.ruby-forum.com/t/polymorphic-associations-agile-rails-book-confusion/105758)

<div class="topic-metadata">

**Author:** [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Replies:** 7\
**Last updated:** [June 3, 2007, 12:16am UTC](https://www.ruby-forum.com/t/polymorphic-associations-agile-rails-book-confusion/105758 "2007-06-03T00:16:49Z")

</div>

On page 350 in the PDF it mentions that having multiple tables have a has\_one relationship to the same table cannot work, that is, class Article has\_one :catalog\_entry end class Sound has\_one :catalog\_entry end c…

---

## [Stack level too deep](https://www.ruby-forum.com/t/stack-level-too-deep/105798)

<div class="topic-metadata">

**Author:** [@hamid](https://www.ruby-forum.com/u/hamid)\
**Replies:** 4\
**Last updated:** [June 3, 2007, 12:15am UTC](https://www.ruby-forum.com/t/stack-level-too-deep/105798 "2007-06-03T00:15:52Z")

</div>

Hello, I am new in using Rails. I want to implement a login system. I got this error: stack level too deep I have following methods: signup login thanks a lot for your help

---

## [Establish\_connection does not raise exception for wrong pass](https://www.ruby-forum.com/t/establish-connection-does-not-raise-exception-for-wrong-pass/105768)

<div class="topic-metadata">

**Author:** [@pytlik](https://www.ruby-forum.com/u/pytlik)\
**Replies:** 8\
**Last updated:** [June 2, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/establish-connection-does-not-raise-exception-for-wrong-pass/105768 "2007-06-02T23:10:45Z")

</div>

Hello, When changing the default yaml-defined-connection via the establish\_connection in, say, a login controller (we are using user-level access to our database), wrong credentials are not immediately notified (no …

---

## [Newbie Question - .RHTML files](https://www.ruby-forum.com/t/newbie-question-rhtml-files/105735)

<div class="topic-metadata">

**Author:** [@jgeggatt](https://www.ruby-forum.com/u/jgeggatt)\
**Replies:** 9\
**Last updated:** [June 2, 2007, 9:16pm UTC](https://www.ruby-forum.com/t/newbie-question-rhtml-files/105735 "2007-06-02T21:16:39Z")

</div>

I am the newest member to ruby and rails. I have a strong desire to learn and right now I purchased my first book (Ajax on Rails) with my 2nd on order at Amazon (Developing web applications using ruby on rails). My b…

---

## [Getting to work the Ajax Example in Agile Web](https://www.ruby-forum.com/t/getting-to-work-the-ajax-example-in-agile-web/105739)

<div class="topic-metadata">

**Author:** [@ben](https://www.ruby-forum.com/u/ben)\
**Replies:** 3\
**Last updated:** [June 2, 2007, 8:46pm UTC](https://www.ruby-forum.com/t/getting-to-work-the-ajax-example-in-agile-web/105739 "2007-06-02T20:46:31Z")

</div>

I’ve been reading Agile Web D. on Rails and getting to work each of the examples UNTIL the example of AJAX in Chapter 23 (“The Web, V2.0” by Justin Gehtland). I’ve written the code exactly per “The Search Example” (or…

---

## [File\_column undefined method \`data\_relative\_path'](https://www.ruby-forum.com/t/file-column-undefined-method-data-relative-path/105793)

<div class="topic-metadata">

**Author:** [@jiajv\_S](https://www.ruby-forum.com/u/jiajv_S)\
**Replies:** 0\
**Last updated:** [June 2, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/file-column-undefined-method-data-relative-path/105793 "2007-06-02T20:17:36Z")

</div>

i use file\_column0.31 and rmagick1.141 i often got the error “undefined method \`data\_relative\_path’ for #Photo:0x6da7568” when the page display image. i print some debug info ,when display natural: in===============…

---

## [How to delete from a HABTM table?](https://www.ruby-forum.com/t/how-to-delete-from-a-habtm-table/105578)

<div class="topic-metadata">

**Author:** [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Replies:** 1\
**Last updated:** [June 2, 2007, 7:43pm UTC](https://www.ruby-forum.com/t/how-to-delete-from-a-habtm-table/105578 "2007-06-02T19:43:49Z")

</div>

Thanks to the wonderful advice of everybody here, I finally understand how to add records to a HABTM table. You treat it like an array, and just use the “\<\<” concatenator to stick the new record on at the end. But how…

---

## [Wicket like templating](https://www.ruby-forum.com/t/wicket-like-templating/105790)

<div class="topic-metadata">

**Author:** [@ittayd](https://www.ruby-forum.com/u/ittayd)\
**Replies:** 0\
**Last updated:** [June 2, 2007, 7:35pm UTC](https://www.ruby-forum.com/t/wicket-like-templating/105790 "2007-06-02T19:35:20Z")

</div>

Hi, I was wondering if anyone has thought about making rails’s templating system more in the concepts of wicket (there are other such templating engines, this is the one i’ve used). With wicket, the template is just …

---

## [Workflows in ruby on rails](https://www.ruby-forum.com/t/workflows-in-ruby-on-rails/143373)

<div class="topic-metadata">

**Author:** [@katthi](https://www.ruby-forum.com/u/katthi)\
**Replies:** 0\
**Last updated:** [June 2, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/workflows-in-ruby-on-rails/143373 "2007-06-02T19:16:20Z")

</div>

hi does ruby on rails support work flows .if so how to develop a frame work in ruby on rails that support work flows give some pointers

---

## [How to route by anchor?](https://www.ruby-forum.com/t/how-to-route-by-anchor/105766)

<div class="topic-metadata">

**Author:** [@fanz](https://www.ruby-forum.com/u/fanz)\
**Replies:** 2\
**Last updated:** [June 2, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/how-to-route-by-anchor/105766 "2007-06-02T18:15:14Z")

</div>

hi,all! I’m new to here.I have a problem about routing anchor or redirect url by anchors,for example: I want to request a url like “www.myhost.com/foo#bar” and then response a new url like “www.myhost.com/foo/bar”. M…

---

## [How to retrieve the XML from a POST API](https://www.ruby-forum.com/t/how-to-retrieve-the-xml-from-a-post-api/105649)

<div class="topic-metadata">

**Author:** [@tenzingk](https://www.ruby-forum.com/u/tenzingk)\
**Replies:** 3\
**Last updated:** [June 2, 2007, 5:56pm UTC](https://www.ruby-forum.com/t/how-to-retrieve-the-xml-from-a-post-api/105649 "2007-06-02T17:56:30Z")

</div>

My Rails app. needs to retrieve XML statistical data from another site’s API. To get the XML page, I need to POST the username and password and date for the stats. So far I have managed to do this: within my app, I …

---

## [Encoded Columns and ActiveRecord](https://www.ruby-forum.com/t/encoded-columns-and-activerecord/105732)

<div class="topic-metadata">

**Author:** [@pallan](https://www.ruby-forum.com/u/pallan)\
**Replies:** 5\
**Last updated:** [June 2, 2007, 5:48pm UTC](https://www.ruby-forum.com/t/encoded-columns-and-activerecord/105732 "2007-06-02T17:48:13Z")

</div>

Hi all, I am trying store IP addresses in a database. In my old PHP days when I wrote the SQL i used the INET\_ATON and INET\_NTOA functions in MySQL to to the conversions of the address when I inserted or pulled the r…

---

## [Number of apps on one server](https://www.ruby-forum.com/t/number-of-apps-on-one-server/105776)

<div class="topic-metadata">

**Author:** [@moesian](https://www.ruby-forum.com/u/moesian)\
**Replies:** 1\
**Last updated:** [June 2, 2007, 5:48pm UTC](https://www.ruby-forum.com/t/number-of-apps-on-one-server/105776 "2007-06-02T17:48:09Z")

</div>

Hi, If I were make small apps in rails such as personal blogs etc I read a post saying that I would only be able to host around 30-40 on a dedicated server as opposed to around 300 if they were wirtten in PHP. I was …

---

## [\[ANN\] Restflection Plugin](https://www.ruby-forum.com/t/ann-restflection-plugin/105749)

<div class="topic-metadata">

**Author:** [@turnip](https://www.ruby-forum.com/u/turnip)\
**Replies:** 2\
**Last updated:** [June 2, 2007, 4:33pm UTC](https://www.ruby-forum.com/t/ann-restflection-plugin/105749 "2007-06-02T16:33:57Z")

</div>

"Restflection is a Ruby on Rails plugin designed for use in applications which follow RESTful conventions. It allows you to extract information about resources without necessarily knowing what they are called. For exa…

---

## [Problem with error\_messages\_for](https://www.ruby-forum.com/t/problem-with-error-messages-for/105000)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 5\
**Last updated:** [June 2, 2007, 4:25pm UTC](https://www.ruby-forum.com/t/problem-with-error-messages-for/105000 "2007-06-02T16:25:51Z")

</div>

I have a number of validations in client.rb like this… validates\_length\_of :first\_name, :last\_name, :maximum =\> 25, :message =\> “Maximum 25 characters and numbers combined” and in my clients\_controller.rb I have thi…

---

## [Fragility of View Tests](https://www.ruby-forum.com/t/fragility-of-view-tests/105774)

<div class="topic-metadata">

**Author:** [@jmckible](https://www.ruby-forum.com/u/jmckible)\
**Replies:** 0\
**Last updated:** [June 2, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/fragility-of-view-tests/105774 "2007-06-02T16:10:22Z")

</div>

I’ve always used the standard unit/functional/integration tests and found them satisfying. I recently started a new project with existing tests written using ZenTest. I was surprised to learn about the controller/vi…

---

## [Emacs and ruby on rails: some bugs](https://www.ruby-forum.com/t/emacs-and-ruby-on-rails-some-bugs/105771)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 1\
**Last updated:** [June 2, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/emacs-and-ruby-on-rails-some-bugs/105771 "2007-06-02T16:00:49Z")

</div>

Hi all, I’m trying to install emacs with rails support. But it has a few quirks. For example the snippets won’t work. I can select them from a menu and then they work fine. But for example when I do: flash nothing ha…

---

## [How to read anchor in controller](https://www.ruby-forum.com/t/how-to-read-anchor-in-controller/105767)

<div class="topic-metadata">

**Author:** [@fanz](https://www.ruby-forum.com/u/fanz)\
**Replies:** 12\
**Last updated:** [June 2, 2007, 3:45pm UTC](https://www.ruby-forum.com/t/how-to-read-anchor-in-controller/105767 "2007-06-02T15:45:47Z")

</div>

Anybody no how to read the anchor of a request? I make an redirect\_to like this: redirect\_to :controller=\>“foo” :action=\>“index” :anchor=\>“bar” then in action indexï¼ŒI try to read url like this: c=request.path\_param…

---

## [Refresh and ajax pages](https://www.ruby-forum.com/t/refresh-and-ajax-pages/105772)

<div class="topic-metadata">

**Author:** [@emiliano](https://www.ruby-forum.com/u/emiliano)\
**Replies:** 0\
**Last updated:** [June 2, 2007, 1:48pm UTC](https://www.ruby-forum.com/t/refresh-and-ajax-pages/105772 "2007-06-02T13:48:30Z")

</div>

In my application (thah use ajax to manage pages) if the user push the browser refresh button after login, the page reloaded is the default (the login page) and not the custom user page. How i can to correct this beha…

---

## [Developing a frame work](https://www.ruby-forum.com/t/developing-a-frame-work/105760)

<div class="topic-metadata">

**Author:** [@katthi](https://www.ruby-forum.com/u/katthi)\
**Replies:** 1\
**Last updated:** [June 2, 2007, 11:22am UTC](https://www.ruby-forum.com/t/developing-a-frame-work/105760 "2007-06-02T11:22:18Z")

</div>

I have to develop a framework in such way that it has to support work flows and persistance storage in ruby on rails .for example if we take office automation system ,if the user interacts with the system,if that eve…

---

## [Screencast in rubyonrails.org](https://www.ruby-forum.com/t/screencast-in-rubyonrails-org/105762)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 2, 2007, 9:32am UTC](https://www.ruby-forum.com/t/screencast-in-rubyonrails-org/105762 "2007-06-02T09:32:04Z")

</div>

i have something problem with screencast in rubyonrails.org. I only hear speech, but not have image.(“Creating weblog in 15 minutes”) (Windows XP, klcodec 2.82f)

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

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