Displaying 20 results from an estimated 7000 matches similar to: "Scaffold NoMethodError on Mac"
2006 Mar 18
24
rails is extremely hard to install
I''m on Mac OSX and I''m about to rip my hair out over how hard it is to
install rails. I''ve installed rubygems and am typing "ruby setup.rb" in
the command line and get "No such file or directory."
I''ve never had to use command lines before so this is alien to me. Can''t
they just make installation GUI-based for non-geeks like
2006 Apr 04
6
Replaced Rails Package with HiveLogic Install - problems
Hi,
I''ve got a strange problem. I had initially installed Rails using Tony
Arnold''s package:
<http://www.tonyarnold.com/articles/category/rails>
and that worked fine. (on OS X, obviously). I then decided to
reinstall using the instructions on the HiveLogic page, to get Ruby
1.8.4:
<http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger>
That
2005 Dec 27
2
NoMethodError in new scaffold
Hi All,
I created a new rails application using rails 1.0. I used "ruby
script\generate scaffold" for each of my tables. This worked on all but
2 of my tables. When I go to the new or edit action of my requests or
admins table, I get the error below.
On one table called admins I hadn''t followed the correct naming
convention and wasn''t able to edit or create
2006 Aug 08
1
Named routes and url generation?
Hi all
In my application I''ve some named routes defined this way...
map.label_context1 '':context1/label'', :controller => ''mycontroller''
map.label_context2 '':context1/:context2/label'', :controller => ''mycontroller''
map.label_context3 '':context1/:context2/:context3/label'', :controller
=>
2007 Mar 26
2
Calling a controller action from script/console or runner
Is there a way to call or invoke a controller method from script/console
or script/runner? The reason is that I''d like to pre-cache some of the
actions on my controller.
The pseudo code below is what I''d like to be able to do:
class MyController < ApplicationController
caches_action :test
def test
puts ''Hi there''
end
end
script/console:
2006 Sep 15
3
How to catch a parameter that contains a full url
Hi
I need some help!
I have controller that I need to pass a full url (with its own
parametrs) as a parameter, e.g. I want to call my controller with:
/mycontroller/catchurl?url=http://somedomain.com/afile.jsp?param1=xx¶m2=yy
and in action "catchurl" in mycontroller.rb I would like to have
params[:url] to be
"http://somedomain.com/afile.jsp?param1=xx¶m2=yy"
2005 Mar 02
2
form action in mail (actionmailer)
Hi everyone. : )
I meet problem when use form tag in actionmailer. (content-type is text/html, surely)
I want to use form action in actionmailer''s view (.rhtml) for some reason.
1. I use start_form_tag helper method as normally, but how I can ?
I did <%= start_form_tag :action => "http://myhostname/mycontroller/myaction" %> or
<%= start_form_tag :action =>
2006 Jan 16
3
routing to controller inside module
Hey,
am i to stupid to find the information about how to route to a
controller in a module? Maybe module support has gone!
The controller is under:
app/controllers/admin/my_controller.rb
The my_controller.rb file looks like this:
module Admin
class MyController
def index
render :text => ''Hello!''
end
end
end
How does a route to all controllers under module
2006 May 21
6
Is there a way to call helper methods in a controller?
Hi,
Is there a way to call helper methods in a controller?
I want to do something like this in my controller
Class MyController < Action....
def my_method
string = link_to "some_url", :controller => "home", :action => "command"
end
end
link_to is an ActionView helper method and it seems that I couldn''t access
the method in the controller
2012 Sep 10
4
Object Efficiency
So I am using rufus-scheduler to call a controller which in turn calls an
email receiver to check emails...
In my controller, I have an instance method called checkEmail
In my rufus config file, I have to call MyController.new.checkEmail. Now I
set it to run every 5 minutes. So the system creates a new MyController
instance every 5 minutes. That''s very inefficient right?
I guess
2006 May 09
2
newbie: OSX Ruby/MySQL issue?
I''m three pages into the OnLamp RoR Tutorial [1] and am wrestling
with what appears to be a MySQL connection problem.
I''ve created a simple controller called "recipe" with a corresponding
"recipes" mysql table. The recipe controller is just a simple scaffold.
When I browse to "recipe/new", though, I get these errors:
==
NoMethodError in
2007 Dec 05
4
render :update and controller private methods
Probably asked and answered, but...
Why are controller private methods inaccessible inside the block
passed to render :update ?
This does not work:
class MyController < ApplicationController
def some_action
render :update do |page|
page.replace_html ''an_element'', some_private_method
end
end
private
def some_private_method
return
2006 Jan 18
1
Helps!!!!! Rails database connection guru needed!!!!!!!
Hi,
I really need help to understand what is happening
while Rails connect to a database, (we area actually
using postgresql, so my example will be with
postgresql) What I understand is Rails is able to
connect to different DB. Actually, this is what we
want, and we have made some tests, everything is juste
fine. However, all these tests lead us to some
important questions that we did find the
2007 Aug 13
8
How to use expect_render?
Hi:
I am a rspec beginner. I have scratched my head for the whole afternoon,
trying to figure out a way of writing render expectation in controller spec.
However, I failed. It kept telling me that the ''expect_render'' was an
undefined method. I have installed rspec 1.0.8 and rspec_on_rails as well.
Below is the controller to be tested.
Controller
def index
pre
2006 Apr 10
2
using web service for authenitcation
I am writting a web service for authenitcation of users and was using
web_service_scaffold :invoke for testing it out...and was able to consume it
using .NET. But my question is, whats the simplest method using which i can
use the same web service in the current Web App. I mean, not from an external
application or something but from the current web apps itself.
I found one method in AWDR, and
2007 Nov 23
12
namespaced controllers
Out of curiosity, I''ve seen the following fail:
module Admin
describe MyController
...
end
end
But this works fine:
describe Admin::MyController
..
end
Why?
Scott
2008 Mar 12
2
Warning: integrate_views and nested description groups
describe MyController do
integrate_views
describe "A common base senario" do
it "no longer integrates views" do
be_careful
end
end
end
integrate_views affects an attribute in the class formed by the describe
factory method. The second describe generates its own class, so
integrate_views is OFF at that level. I''ve already spent far, far too much
2005 Apr 26
0
NoMethodError (undefined method `fetch_fields' for nil:NilClass)
Hi
I''m new to Rails (and Ruby) and I can''t get it to work properly.
Every time I want to do something with my database-connection (e.g.
use scaffold) I get this, or something similiar (from development.log):
>> Beneath this code there''s some more text <<
-------
Processing CategoryController#index (for 127.0.0.1 at Tue Apr 26
21:43:45 CEST 2005)
2005 Dec 29
3
NoMethodError problem
Hello.
Id like you to help me with something here, i m trying to create a log
manager just for fun but I cant make it work since the beginning.
I created my project, configured the db, initialized my model Log and
then my controller Log, then im just trying to use scaffold :log for the
controller but I cant make it work, the error says:
undefined method `errors'' for
2008 Apr 30
1
NoMethodError in AdminController#index
I am reading Agile Web Development with Rails and after setting
everything up with the first application I get the following error:
NoMethodError in AdminController#index undefined method `scaffold
I then installed the plugin for scaffold and I got this error:
undefined method `paginate''
I have read on the web and in this group about installing The paginate
plugin but I cannot get it