# Rails

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

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

---

## [Server uptime](https://www.ruby-forum.com/t/server-uptime/123505)

<div class="topic-metadata">

**Author:** [@kilo](https://www.ruby-forum.com/u/kilo)\
**Replies:** 1\
**Last updated:** [December 18, 2007, 9:52am UTC](https://www.ruby-forum.com/t/server-uptime/123505 "2007-12-18T09:52:35Z")

</div>

How to show servers uptime on a page?

---

## [Script/runner as a single instance](https://www.ruby-forum.com/t/script-runner-as-a-single-instance/123501)

<div class="topic-metadata">

**Author:** [@aantix](https://www.ruby-forum.com/u/aantix)\
**Replies:** 0\
**Last updated:** [December 18, 2007, 8:23am UTC](https://www.ruby-forum.com/t/script-runner-as-a-single-instance/123501 "2007-12-18T08:23:52Z")

</div>

I am utilizing the script/runner script to launch a few models for maintenance on my application. Is there any to ensure that only a single instance of a certain process is running? I guess I could have the model che…

---

## [Updating metadata for 11 gems](https://www.ruby-forum.com/t/updating-metadata-for-11-gems/123499)

<div class="topic-metadata">

**Author:** [@bullet](https://www.ruby-forum.com/u/bullet)\
**Replies:** 0\
**Last updated:** [December 18, 2007, 8:15am UTC](https://www.ruby-forum.com/t/updating-metadata-for-11-gems/123499 "2007-12-18T08:15:21Z")

</div>

I justed typed “gem outdated” and got the following output in my terminal: Updating metadata for 11 gems from http://gems.rubyforge.org … complete My first thought was that there are some gems neeeded to be updated …

---

## [AJAX form validation](https://www.ruby-forum.com/t/ajax-form-validation/123489)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 0\
**Last updated:** [December 18, 2007, 6:23am UTC](https://www.ruby-forum.com/t/ajax-form-validation/123489 "2007-12-18T06:23:33Z")

</div>

I am making simple login form with… if session\[:user\] = User.authenticate(params\[:user\]\[:login\], params\[:user\]\[:password\]) render :update do |page| page.redirect :action =\> ‘index’ end end in controller but this d…

---

## [How to upload only photos but not any files in to ror applic](https://www.ruby-forum.com/t/how-to-upload-only-photos-but-not-any-files-in-to-ror-applic/123492)

<div class="topic-metadata">

**Author:** [@dvk](https://www.ruby-forum.com/u/dvk)\
**Replies:** 0\
**Last updated:** [December 18, 2007, 6:19am UTC](https://www.ruby-forum.com/t/how-to-upload-only-photos-but-not-any-files-in-to-ror-applic/123492 "2007-12-18T06:19:06Z")

</div>

Hii i hav been learning this from few days. I was doing a module on uploading photos. I reuired to upload photos in to our application and NOTE is only photos in each and every format like jpeg,gif must upload but n…

---

## [Anybody using begin/rescue](https://www.ruby-forum.com/t/anybody-using-begin-rescue/123450)

<div class="topic-metadata">

**Author:** [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Replies:** 7\
**Last updated:** [December 18, 2007, 5:56am UTC](https://www.ruby-forum.com/t/anybody-using-begin-rescue/123450 "2007-12-18T05:56:13Z")

</div>

i came from java world, and it is really big there. i don’t see a lot in ruby code samples. just a little. anybody out there using it? or is the errors just emailed to you?

---

## [Can not test if model name is Tester in rails 2 (ArgumentError: wrong number of arguments (0 for 1)](https://www.ruby-forum.com/t/can-not-test-if-model-name-is-tester-in-rails-2-argumenterror-wrong-number-of-arguments-0-for-1/123487)

<div class="topic-metadata">

**Author:** [@gampolt](https://www.ruby-forum.com/u/gampolt)\
**Replies:** 0\
**Last updated:** [December 18, 2007, 5:43am UTC](https://www.ruby-forum.com/t/can-not-test-if-model-name-is-tester-in-rails-2-argumenterror-wrong-number-of-arguments-0-for-1/123487 "2007-12-18T05:43:22Z")

</div>

I’m using rails 2.0.1 now. Here is the step for generate the error Create rails project name demo “rails demo” I create model name “Tester” using command “ruby script/generate model Tester name:string description:tex…

---

## [Anybody using pclinuxos?](https://www.ruby-forum.com/t/anybody-using-pclinuxos/123481)

<div class="topic-metadata">

**Author:** [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Replies:** 0\
**Last updated:** [December 18, 2007, 4:57am UTC](https://www.ruby-forum.com/t/anybody-using-pclinuxos/123481 "2007-12-18T04:57:25Z")

</div>

how is it working for ya installing ruby, rails, and gems? did you use the FiveRuns RM installer? thanks.

---

## [Posting xml without using curl](https://www.ruby-forum.com/t/posting-xml-without-using-curl/123479)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 1\
**Last updated:** [December 18, 2007, 4:46am UTC](https://www.ruby-forum.com/t/posting-xml-without-using-curl/123479 "2007-12-18T04:46:06Z")

</div>

How can you post XML data without using curl. I know it probably has something to do with Net::HTTP, but Im sure you have to do something a bit different. The reason I cant use curl is because there seems to be a limi…

---

## [I have a question about scaffold on rails2](https://www.ruby-forum.com/t/i-have-a-question-about-scaffold-on-rails2/123477)

<div class="topic-metadata">

**Author:** [@monad](https://www.ruby-forum.com/u/monad)\
**Replies:** 1\
**Last updated:** [December 18, 2007, 4:33am UTC](https://www.ruby-forum.com/t/i-have-a-question-about-scaffold-on-rails2/123477 "2007-12-18T04:33:48Z")

</div>

i’m a rails newbie,i am reading Agile Web D. with Railsï¼ŒSecond Edition. my rails version is 2.0.2. i create a controller admin ,i edit admin\_controller and add a line: scaffold :product. but after i start server, i…

---

## [Juggernaut with backgroundrb](https://www.ruby-forum.com/t/juggernaut-with-backgroundrb/111861)

<div class="topic-metadata">

**Author:** [@kaffepanna](https://www.ruby-forum.com/u/kaffepanna)\
**Replies:** 2\
**Last updated:** [December 18, 2007, 3:33am UTC](https://www.ruby-forum.com/t/juggernaut-with-backgroundrb/111861 "2007-12-18T03:33:02Z")

</div>

Hej. Im building a webbased chat client with juggernaut and backgroundrb. The idÃ©a was that the client runs on its own process in a worker and acts on responses from the actual chat server and then send page updates …

---

## [RESTful checkbox to complete task](https://www.ruby-forum.com/t/restful-checkbox-to-complete-task/123472)

<div class="topic-metadata">

**Author:** [@jcontonio](https://www.ruby-forum.com/u/jcontonio)\
**Replies:** 10\
**Last updated:** [December 18, 2007, 3:13am UTC](https://www.ruby-forum.com/t/restful-checkbox-to-complete-task/123472 "2007-12-18T03:13:10Z")

</div>

Here’s where I am right now: View: \<% for task in @tasks %\> \<%= link\_to “Complete”, complete\_task\_path(task) %\> \<%=h task.body %\> \<%= link\_to ‘Edit’, edit\_task\_path(task) %\> \<%= link\_to ‘Destroy’, task, :confirm =\>…

---

## [Read\_attribute mystery](https://www.ruby-forum.com/t/read-attribute-mystery/123467)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 11\
**Last updated:** [December 18, 2007, 2:57am UTC](https://www.ruby-forum.com/t/read-attribute-mystery/123467 "2007-12-18T02:57:57Z")

</div>

I have the following 3 classes: class User \< ActiveRecord::Base has\_many(:project\_roots) end class Project \< ActiveRecord::Base self.acts\_as\_tree(:order =\> “title”, :uniq=\>true) def user() self.root.user() end en…

---

## [Is caching in the database wrong?](https://www.ruby-forum.com/t/is-caching-in-the-database-wrong/123468)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 1\
**Last updated:** [December 18, 2007, 2:02am UTC](https://www.ruby-forum.com/t/is-caching-in-the-database-wrong/123468 "2007-12-18T02:02:25Z")

</div>

For example if I have an order that has many line\_items. The total = (sum of line items) + shipping\_cost. Would it be wrong to just add a “total” field in the orders table? That basically serves as a cache. When an or…

---

## [Programatically determine owner class](https://www.ruby-forum.com/t/programatically-determine-owner-class/123469)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 2\
**Last updated:** [December 18, 2007, 1:47am UTC](https://www.ruby-forum.com/t/programatically-determine-owner-class/123469 "2007-12-18T01:47:12Z")

</div>

If say I have this class: class MyClass self.belongs\_to(:user) end Is there a way to programatically determine who MyClass belongs to?

---

## [Are partial custom reference names possible?](https://www.ruby-forum.com/t/are-partial-custom-reference-names-possible/123459)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 6\
**Last updated:** [December 18, 2007, 1:39am UTC](https://www.ruby-forum.com/t/are-partial-custom-reference-names-possible/123459 "2007-12-18T01:39:26Z")

</div>

I have a couple different partials for members, to which each have names that somewhat describe what the partial is: ex member\_pic \<%= render :partial =\> “admin/members/member\_pic”, :collection =\> @members %\> Which …

---

## [Include, extend, module\_eval, class\_eval](https://www.ruby-forum.com/t/include-extend-module-eval-class-eval/123454)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 2\
**Last updated:** [December 18, 2007, 1:26am UTC](https://www.ruby-forum.com/t/include-extend-module-eval-class-eval/123454 "2007-12-18T01:26:44Z")

</div>

It all gets confusing. I have posted a blog about what works and what doesn’t. If you think I have missed out anything then do let me know. http://www.neeraj.name/503/include-extend-module\_eval-class\_eval

---

## [Error in send\_file](https://www.ruby-forum.com/t/error-in-send-file/123366)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 2\
**Last updated:** [December 18, 2007, 1:00am UTC](https://www.ruby-forum.com/t/error-in-send-file/123366 "2007-12-18T01:00:56Z")

</div>

I’m trying to add a link to download a zip file. I created a controller method that makes the call to send\_file: def getzip send\_file ‘file.zip’ end When I navigate to this link I get a MissingFile exception. The …

---

## [Failed install of 2.0.2](https://www.ruby-forum.com/t/failed-install-of-2-0-2/123461)

<div class="topic-metadata">

**Author:** [@explainer](https://www.ruby-forum.com/u/explainer)\
**Replies:** 2\
**Last updated:** [December 18, 2007, 12:56am UTC](https://www.ruby-forum.com/t/failed-install-of-2-0-2/123461 "2007-12-18T00:56:49Z")

</div>

I attempted to install ruby 1.8.6, gem 0.9.5, and rails 2.0.2. The first two steps went fine, but I get the following: xxx@yyy:~/rubygems-0.9.5$ sudo gem install rails -y INFO: gem install -y is now default and will…

---

## [Yet another primary key and migrations question](https://www.ruby-forum.com/t/yet-another-primary-key-and-migrations-question/123429)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 2\
**Last updated:** [December 18, 2007, 12:50am UTC](https://www.ruby-forum.com/t/yet-another-primary-key-and-migrations-question/123429 "2007-12-18T00:50:20Z")

</div>

I’ve read the messages concerning this issue, but I haven’t come to a conclusion. I have a legacy db with data I have to import to my new app, as it is. So I can’t use the auto-increment “id” my migrations generate. I…

---

## [Newbie with nested resources on rails 2.0](https://www.ruby-forum.com/t/newbie-with-nested-resources-on-rails-2-0/123266)

<div class="topic-metadata">

**Author:** [@gsiener](https://www.ruby-forum.com/u/gsiener)\
**Replies:** 3\
**Last updated:** [December 18, 2007, 12:25am UTC](https://www.ruby-forum.com/t/newbie-with-nested-resources-on-rails-2-0/123266 "2007-12-18T00:25:09Z")

</div>

Hi, I just started with rails, and thought it made sense to go with 2.0 ( know this isn’t necessarily a majority opinion :wink: I have an application which will potentially be used for a number of towns, each one of…

---

## [Undefined method \`param\_posted?'](https://www.ruby-forum.com/t/undefined-method-param-posted/123433)

<div class="topic-metadata">

**Author:** [@tresero](https://www.ruby-forum.com/u/tresero)\
**Replies:** 2\
**Last updated:** [December 18, 2007, 12:11am UTC](https://www.ruby-forum.com/t/undefined-method-param-posted/123433 "2007-12-18T00:11:07Z")

</div>

I upgraded an app to 2.01 and can’t figure out why I am getting a undefined method \`param\_posted?’ for #\<ControlPanelController: 0xb748ba18\> The controller should be inheriting this. class ControlPanelController \< Ap…

---

## [Determine user/computer name](https://www.ruby-forum.com/t/determine-user-computer-name/123452)

<div class="topic-metadata">

**Author:** [@anthony](https://www.ruby-forum.com/u/anthony)\
**Replies:** 4\
**Last updated:** [December 18, 2007, 12:05am UTC](https://www.ruby-forum.com/t/determine-user-computer-name/123452 "2007-12-18T00:05:51Z")

</div>

Is it possible to somehow get the computer name or Windows user name of the person accessing my internal web page? I can get the remote IP address, but what I really need is the remote user or computer name.

---

## [Sentry and Rails validations](https://www.ruby-forum.com/t/sentry-and-rails-validations/123456)

<div class="topic-metadata">

**Author:** [@Olly\_L](https://www.ruby-forum.com/u/Olly_L)\
**Replies:** 1\
**Last updated:** [December 17, 2007, 11:58pm UTC](https://www.ruby-forum.com/t/sentry-and-rails-validations/123456 "2007-12-17T23:58:14Z")

</div>

I’m looking at using Sentry (http://sentry.rubyforge.org/) to encrypt a number of sensitive fields in an ActiveRecord model. I’m encrypting a field which is currently called account\_number. Sentry requires that the…

---

## [Need help with a search logic problem](https://www.ruby-forum.com/t/need-help-with-a-search-logic-problem/123460)

<div class="topic-metadata">

**Author:** [@ReidO](https://www.ruby-forum.com/u/ReidO)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/need-help-with-a-search-logic-problem/123460 "2007-12-17T23:55:18Z")

</div>

I’m of course a Ruby noob, but not only that I’m a programing noob, so I think I would have this problem no matter what language I’m working with. I’m trying to do a search for my website and can do listings of prope…

---

## [Multiple form fields for condition statement](https://www.ruby-forum.com/t/multiple-form-fields-for-condition-statement/123457)

<div class="topic-metadata">

**Author:** [@nickmc](https://www.ruby-forum.com/u/nickmc)\
**Replies:** 1\
**Last updated:** [December 17, 2007, 11:52pm UTC](https://www.ruby-forum.com/t/multiple-form-fields-for-condition-statement/123457 "2007-12-17T23:52:22Z")

</div>

I have a search form with multiple imputs and I want to build the sql command using the find method with multiple conditions. below is the code I’m using. When I just enter in 1 field (any of the \*\*\*\*value variables…

---

## [Trouble with AJAX-like uploads](https://www.ruby-forum.com/t/trouble-with-ajax-like-uploads/123076)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 1\
**Last updated:** [December 17, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/trouble-with-ajax-like-uploads/123076 "2007-12-17T23:50:36Z")

</div>

So I’ve been following various tutorials to implement an ajax-like file upload using responds\_to\_parent and iframe targets, but can’t quite close the deal. My file uploads successfully, but the rjs doesn’t work (my ‘e…

---

## [Unique id per page (controller)](https://www.ruby-forum.com/t/unique-id-per-page-controller/123428)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 9\
**Last updated:** [December 17, 2007, 11:42pm UTC](https://www.ruby-forum.com/t/unique-id-per-page-controller/123428 "2007-12-17T23:42:07Z")

</div>

is there a ways to get a unique id (number) which is unique for each executing page … sometimes i need a unique number to identify html elements in order to access them later with javascript. i would like to call so…

---

## [Double Relationship on 2 Entities](https://www.ruby-forum.com/t/double-relationship-on-2-entities/123418)

<div class="topic-metadata">

**Author:** [@mex23](https://www.ruby-forum.com/u/mex23)\
**Replies:** 1\
**Last updated:** [December 17, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/double-relationship-on-2-entities/123418 "2007-12-17T23:37:45Z")

</div>

Ok, i have a little question. I am developing an app and writing down the schema for my database i have this 2 entities (we call them like this in italian, don’t know the right word in english, sorry). USER and RESO…

---

## [Problem with server](https://www.ruby-forum.com/t/problem-with-server/196544)

<div class="topic-metadata">

**Author:** [@ratschi85](https://www.ruby-forum.com/u/ratschi85)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/problem-with-server/196544 "2007-12-17T23:36:35Z")

</div>

I get the following error when trying to start the server. Can anyone help me on how to resolve this? rajeev@osibuild7:~/Desktop/logo/logo$ script/server \*\* Ruby version is not up-to-date; loading cgi\_multipart\_eof\_fi…

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

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