Displaying 20 results from an estimated 1000 matches similar to: ""uninitialized constant PostsController::Post""
2011 Apr 25
30
NoMethodError in Book
I got a following error.
NoMethodError in Book#new
Showing /home/amrit/boook/app/views/book/_form.html.erb where line #1
raised:
undefined method `model_name'' for NilClass:Class
The content of _form.html.erb file are:
<%= form_for(@post) do |f| %>
<% if @post.errors.any? %>
<div id="error_explanation">
<h2><%=
2010 Oct 22
6
(Unable to start rails application) ruby scipt/server error
1) I installed the ruby-1.9.2-p0 and rubygems-1.3.7 in the
(/usr/local/src directory )
2) Then i installed rails from terminal by typing follwoing
sudo gem install rails --include-dependencies
3) Then i made a rails applcation from terminal as
rails new demo
then
cd demo
ruby
2011 May 18
9
Address already in use - bind(2) (Errno::EADDRINUSE)
I made a new rails app and when i started the server ,it gave
following error message.
=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/lib/ruby/1.8/mongrel/tcphack.rb:12:in
`initialize_without_backlog'': Address already in use - bind(2)
(Errno::EADDRINUSE)
from
2011 Jun 14
5
Buttons's routing
Hey
My app has some buttons and i have route all to different action
in router.rb file but click on each button results in same action. why?
Am i missing to specify anything...)
Rails:3.0.7
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2012 Feb 11
1
rake command shows the error
rails -v=2.3.8
gem -v= 1.4.2
ruby -v=1.8.7
When i issue the "rake" command ,it gives the following error .
(in /home/amrit/amrit/OSV/OpenStreetView)
/usr/bin/ruby1.8 -I"lib:test"
"/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
"test/functional/main_controller_test.rb"
"test/functional/upload_controller_test.rb"
2006 Dec 10
5
model-controller-paradigm: What about admin controllers?
Hi all
We all know the model-controller-paradigm: I have a model "News" which
has a corresponding CRUD-controller "NewsController".
But now I''m quite unsure about the following...
Guess we have normal visitors that visit our site www.??.com/news and we
have administrators that create and modify news items.
The admin should see an "Edit" link and a
2011 May 27
3
unable to start server
When i start the server "rails s",following error message appears:
=> Booting WEBrick
=> Rails 3.0.7 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/mapper.rb:167:in
`default_controller_and_action'': missing :controller
2006 Jul 04
8
writing to many_to_many table
I have three tables. users, posts, users_posts. This last one is to
mark a post as read.
How do I write to the users_post table?
Here''s what I have:
In model ''User_Post''
belongs_to :post
belongs_to :user
In post/view/show:
<%= link_to "Mark As Read", :controller => ''post'', :action =>
''post_read'',
:user =>
2008 Jul 07
3
How to get a users screen name into a hidden field in a PostsController action?
Instead of the user entering a name, I want to pass their screen name
along with supplied :title and :content fields. here is what I''ve
got..
f.hidden_field :author, user.screen_name
here is the create method from Posts controller:
def create
@title = "Gravity"
@user = User.find(params[:id]) # this does not work, and I don''t
know why
if request.post?
2011 Apr 18
6
whyt should i use mongrel_cluster ?
why should i use mongrel_cluster in my rails application?
What are its benefits for which i should install and configure it
?
is webrick server not enough for rails application?
Thanks
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2013 May 04
21
Getting started w/ Rails 4
Hi. I''m trying to run Getting started tutorial under Rails 4.0.0.beta1
although it assumes it runs on Rails 3. I was able to get rid of all
errors by wrapping post_params here and there, and installing
protected_attributes Gem for attr_accessible to make sense. Post/
comment CRUD works just fine, but I don''t seem to be able to add Tags
(the final part of the tutorial). Post saved
2008 Jun 02
0
Rails 2.1 - when PostsController is present, creating Admin::PostsController fails
Hi,
just found out small problem with Rails 2.1.
If I run a "script/generate scaffold post title:string" that creates
PostsController and later want to make admin controller for it by
running "script/generate controller admin/posts", Rails complain that:
"The name ''Admin::PostsHelper'' is either already used in your
application or reserved by Ruby on
2012 Apr 09
8
Rails Functional Testing Problem
I''m trying to run some functional tests on Rails. However I am coming up
with the following error.
RuntimeError: Called id for nil, which would mistakenly be 4 -- if you
really wanted the id of nil, use object_id
app/controllers/posts_controller.rb:11:in `create''
posts_controller_test.rb:5:in `test_should_create''
Here is my test file
require
2012 Nov 01
2
SyntaxError in Posts#index
getting this error
compile error
/Users/bradwrage/webapps/blog/app/views/posts/index.html.erb:5: syntax error, unexpected ''=''
...w Goal", new_post_path, class="btn btn-success" );@output_bu...
^
/Users/bradwrage/webapps/blog/app/views/posts/index.html.erb:7: syntax error, unexpected kDO_BLOCK, expecting kEND
''); @posts.each
2011 May 06
1
scaffold didn't work
i am using rails -v 3.0.7.when i tried "rails generate scaffold try
name:string number:decimal" , it gave following error message
invoke active_record
/usr/lib/ruby/1.8/yaml.rb:133:in `load'': syntax error on line 7, col
2: ` pool: 5'' (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in `load''
from
2011 Jan 06
2
Link_to parameters
Hello,
I would like to have a link_to automatically populate a field in the
form that it is linking to.
For example (excuse my silly words, im trying to make a point)
<%= link_to "Add a COOL Post", new_post_path, :howcoolisit => ''COOL''
%>
<%= link_to "Add a NOTCOOL Post", new_post_path, :howcoolisit =>
''NOTCOOL'' %>
Then,
2008 Dec 22
2
Download lustre 1.6.6
i am unable to download lustre 1.6.6 , links does seems to be broken but its
not working
--
Regards--
Rishi Pathak
Pune-Maharastra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lustre.org/pipermail/lustre-discuss/attachments/20081222/e72e8bc2/attachment-0001.html
2009 Oct 18
2
How to create MULTILEVELS in a dataset??
Dear R users
I have a data set which has five variables. One depenedent variable y, and 4
Independent variables (education-level, householdincome, countrygdp and
countrygdpsquare). The first two are data corresponding to the individual
and the next two coorespond to the country to which the individual belongs
to. My data set does not make this distinction between individual level and
country
2006 Jun 13
9
Find DB items by "title"
I''m having trouble finding then displaying all items in my "posts" table
that match a certain search string.
I have a from field:
<%= start_form_tag :action=> "search" %>
<div title="Search" id="searchform" class="form">
<h3>Search</h3>
<%= error_messages_for ''post''
2009 Jul 11
2
Heckman Selection Model/Inverse Mills Ratio
I have so far used the following command
glm(formula = s ~ age + gender + gemedu + gemhinc + es_gdppc +
imf_pop + estbbo_m, family = binomial(link = "probit"))
My question is
1. How do i discard the non significant selection variables (one out of the
seven variables above is non-significant) and calculate the Inverse Mills
Ratio of the significant variables
2. I need the inverse