similar to: newbie question - routes.rb on server

Displaying 20 results from an estimated 3000 matches similar to: "newbie question - routes.rb on server"

2006 Jul 22
3
Connection refused - connect(2)
Dear all, Please help me in this regards, I am using models to access LegacySchemas using set_table_name and set_primary_key... [code for model] class CdDetails < ActiveRecord::Base def self.find_data set_table_name ''cd_details'' set_primary_key ''cd_label'' find (:first, :select => "cd_label") end
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout test_controller def list layout "stdlayout" end in the views/test/layouts stdlayout.rhtml <html> <head><title>test</title></head> </body> <h1>Test</h1> <%= content_for_layout %> </body> </html> 2) I get Rails Application Error when trying to use a separate
2006 May 04
6
second assert_tag failling in rails integration test
Hi all, I''m fairly new to rails and ruby, but I''ve come across an interesting glitch and I''m not sure whether I''ve just got something wrong with my assumptions or if it really is an error in the underlying framework... I''ve created a bare-bones set of tests to show you where the problem is. What follows are the steps I went through to reproduce the
2007 Jun 10
0
pb when posting to an action "render_text body, :status => 400"
Hi, I''m trying to do a little openid-server in rails. I encounter a very strange problem for me, you can see all the story in the openid mailing-list : http://lists.openidenabled.com/pipermail/dev/2007-May/000666.html http://lists.openidenabled.com/pipermail/dev/2007-June/000700.html In short, the problem is : the server has to do a "render_text body, :status => 400"
2005 Oct 21
8
Wrong number of arguments (1 for 0) on routes.rb
Hi, I''m baffled by this error. I need a simple controller to send e-mails, so first I thought about just creating the controller manually (without using script/generate), since that didn''t seem to work, I created a dummy table in my DB and used the usual procedure to generate scaffold code. Then I modified the controller to have only two methods, send and compose: class
2006 Oct 01
9
How to create a very simple form
Hi all, I would like to create a very simple form with RoR similar to this one in ASP.Net: http://quickstarts.asp.net/QuickStartv20/aspnet/samples/ctrlref/standard/TextBox/TextBox1_vb.aspx I my RoR project I want to add a Greeter class like this one: class Greeter def initialize(name = "World") @name = name end def say_hi puts "Hi #{@name}!" end def
2006 Jul 16
6
Apache2.2 + Mongrel: what do you think about these perfs?
Hi all, I''ve been spending quite a lot of time trying to install a decent RoR server on my dedicated server (Ubuntu 6.06 LTS), and now, everything works. However, the performances are not really what I had expected... I would like to know what you think about it. Here is my config: 2GHz VIA proc, 1Gb RAM, SATA-II HD. I have apt-got ruby 1.8.4, mysql5 and installed rails 1.1.4 by
2006 Jul 14
1
no such file found
I''m trying to set up my app on Linux SUSE, apache2 using fastcgi. Now at http://host/ I''m able to see the greeting page (index.html in public). However, if I try to access my app http://host/candidate/index I keep getting in the log: No such file to load -- /usr/home/nye/hire/public/../config/../app/controller/test_controller.rb Did I set my path wrong? What''s
2006 Apr 10
1
Error When Sorting
Got a bug I cannot eliminate. My ajax style sorting looks cool but the position change is never updated. The error (at bottom points to line 52 in my controller and I have indicated that line). #view <!-- Question Data --> <h2>Test Questions</h2> <div id="list_questions"> <%= render(:partial => "list_questions") %> </div>
2006 Mar 29
0
Bug with skip_before_filter?
There seems to be a bug with skip_before_filter using the :only or :except conditionals. Or am I using them completely wrong? I have this code: The result is that :test_filter is skipped for both index, and index_no_filter. application.rb # Filters added to this controller will be run for all controllers in the application. # Likewise, all the methods added will be available for all
2006 Jan 17
4
textarea problem with accentued chars
Hello, I have a problem with accentued characters return from a textarea I have 3 simple files to show example ( below ). index.rhml : If I put "?nial" inside the textarea, then submit to :action => post post.rhml : wrote ?nial 195 "\303\251nial" // params[:comment][:message] return => ?nial params[:comment][:message][1] return => 195 ! ( 195 is not
2006 Jun 01
9
access model from controller
Hello, Rather new to RoR, so I''m not sure about the terminology and such :-/ . My question is: how could I know the model which is associated to a controller? For example: - controller class is TestController, which is a subclass of ApplicationController - associated model class is Test How could I write some code in a method of ApplicationController to dermine the current
2005 Dec 29
3
Class Variable Scope
(Hopefully) a quick question about variable scope issues. In one of my controllers, I have a class variable: class TestController < ApplicationController @@testClassVariable = 0 ... The problem is, in my "list" method I''m trying to increment this variable by one each time, printing it out, but it seems to reset to 0 every time the list method is called: def list
2006 Jul 10
2
''uninitialized constant'' error
Hi All, I am fairly new to Ruby and backgroundRB. I am trying to run a simple example in Windows to get my feet wet with backgroundRB and am running into an ''uninitialized constant'' error when I invoke the controller on my rails app. In ''MyTest'' Controller ------------------- def longrun session[:job_key] = MiddleMan.new_worker(:class =>
2006 Jun 07
1
What is class TestController < ActionController::Base
What are the different parts of; class TestController < ActionController::Base? I look at the http://api.rubyonrails.org/ and try to understand but I don''t. Could someone give me a hint? I get the part of Test being the "folder", def and all that, but I can''t find an explanation of the basic stuff. -- Posted via http://www.ruby-forum.com/.
2005 May 17
5
Strings, Variables and GetText
Hi, I''m starting to use GetText and have this code: render_text %(<script language="JavaScript" type="text/javascript"> parent.mainframe.onUpdateNew("Gallery <b>#{@media.name}</b> was successfully created.", "#{@media.name}","#{String(@media.id)}","#{@media.media_type}"); </script>) I need to convert
2007 May 21
4
Just upgraded to 1.0.0, should render_text isn''t working for me
I finally got around to upgrading from 0.8.2 (!!). I had a spec which looked like specify "should render abc123" do controller.should_render :text => "abc123" get :key end With 1.0.0, the new spec is it "should render abc123" do get :key response.should render_text("abc123") end However it doesn''t work, giving me the error: undefined
2005 Dec 26
3
probably a very dumb question
why does <%= render_text "hey ya" %> cause ''undefined method `render_text'' for #<#<Class:0x3851120>:0x3851000>'' can i use render text in a template? -- Posted via http://www.ruby-forum.com/.
2006 May 14
0
Invoke .Net WebService error in RoR
I have written a webservice: ----------- Service.cs ---------------- using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Service : System.Web.Services.WebService { [WebMethod] public string HelloWorld(string name)
2007 Sep 04
3
[U] Rsync Errors
UNCLASSIFIED//// I am seeing the following errors occasionally when doing an rsync between servers (Solaris 9) at the local and remote site. Has anyone seen these errors before or know what they are? rsync error: error in rsync protocol data stream (code 12) at io.c(1122) [sender=2.6.9] rsync error: protocol incompatibility (code 2) at io.c(954) [sender=2.6.9] rsync error: protocol