Displaying 20 results from an estimated 2000 matches similar to: "No route matches [GET] "/microposts/304""
2011 Jul 22
9
Active Record Issue (I think)
I''m following a rails tutorial (Hartl) and it''s been fine so far, but
something doesn''t seem to be working right.
I have two basic models so far, "User" and "Micropost".
class User < ActiveRecord::Base
has_many :microposts
end
class Micropost < ActiveRecord::Base
belongs_to :user
end
If I do something like:
"first_user =
2013 Mar 02
3
Following railstutorial.org tutorial, how to make the microposts be seen by all?
I am a new learner of Ruby on Rails.
I followed through the railstutorial.org tutorial and I''m trying to
learn off the sample demo app where you can to make microposts and only
the people who are "following" you can see them.
If I wanted to make it so every user can see microposts as an additional
functionality, what are the steps to do that?
--
Posted via
2012 Jul 18
3
Undefined method error
I have been working on a project based on Michael Hartl''s book Ruby on
Rails Tutorial in order to try to teach myself Ruby on Rails. However,
when it tries to render a form designed to allow a user to submit a
small message, I get an error saying, "undefined method `model_name'' for
NilClass:Class". It says the error is at line 1, which is "<%= form_for
2012 Jul 17
24
Static Pages from Railcast
Hi everyone,
I need several pages to be static but also modify when requested. I try
following the railcast from Ryan at
http://railscasts.com/episodes/117-semi-static-pages?view=comments
Here what I have done!!
rails g scaffold Pages name:string permanentlink:string title:string
author:string access_level:string is_published:boolean
meta_description:string meta_keyword:string
2012 Jul 19
6
Rendering Partial
I am a bit confused when coming from layout and partials.
To start of I have a file called application.html.erb which has my
layout such has follow
<html>
<head>
<body>
<%= render ''layouts/footer'' %>
</body
</html>
This call a new file _footer.html.erb
This file his has follow
<footer class="footer">
<nav>
<%=
2013 Mar 16
3
Do you ALWAYS use "bundle exec rspec spec" tests?
I''m going through Michael Hartl''s Rails tutorial, and I am happy to report
that (as of the end of section 7) I''m able to get things working. (That
said, I skipped the section on automated testing, as Hartl warned that
automated testing is the most likely part of his book to become outdated.)
There is a heavy emphasis on the "bundle exec rspec spec" tests.
2013 May 02
1
trouble-with-capybara-and-rspec-on-a-new-model-spec
I have searched a lot for a solution, but I could not find it! I am trying
to make a rails application after watching Michael Hartl''s tutorial and
when i fill data manually and submit it nothing happens and nothing records
in the Mailers table and I am facing the following error:
Failures:
1) Mailer pages mail us with valid information should send a mail
Failure/Error: expect
1999 Nov 10
1
read.table problems
Yesterday I asked for help about read.table with a CSV file. I
received the following help. As always many thanks for the prompt
responses. Now I load my csv file in a text editor ( pfe) and delete
all spaces.
My original mail is at the end.
From: Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk>
Do you have spaces before the commas in your file?
> Yes, number , space,
1999 Nov 10
1
read.table problems
Yesterday I asked for help about read.table with a CSV file. I
received the following help. As always many thanks for the prompt
responses. Now I load my csv file in a text editor ( pfe) and delete
all spaces.
My original mail is at the end.
From: Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk>
Do you have spaces before the commas in your file?
> Yes, number , space,
2011 Jun 12
3
Problem with undefined variable current_user
Hi everyone,
I''m working through the tutorial at the following link and attempting to
customise/adapt the lessons for my own slightly different application.
Link:
Ruby on Rails Tutorial: Learn Rails by Example | Ruby on Rails 3
Tutorial book and screencasts | by Michael Hartl
<http://ruby.railstutorial.org/ruby-on-rails-tutorial-book>
I''m currently trying to work
2013 Oct 04
4
Best Book 4 RoR
Hello,
Is there a great book for Ror. I am looking for a book with a step by step
approch and by PROJECTS!!
RoR needs to be ''practiced'', and i didn''t find those WORKING PROJECTS.
Am i dreaming or is this paper exists. All the books on amazon are not
amazING. They talks only about
theory. Theory is fine, i mean this is RoR. But then...
Thanks for those who, first,
2007 Aug 29
12
ruby on rails search engine
He all,
who can recommend me search engine(search for different models) for my
web-site?
ps: i know about ferret for example, but maybe there are some others?
Thank you
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this
2012 Dec 03
2
Stop User from Changing URL
I have an authentication and autherization system built on the same
lines outlined by Michael Hartl, rails tutorial.
Here is the employees_controller.rb:
class EmployeesController < ApplicationController
before_filter :signed_in_employee, only:
[:index, :edit, :update]
before_filter :correct_employee, only:
[:edit, :update]
etc
etc
2008 May 21
3
How to access Rails::Configuration instance methods
There was a thread yesterday about ENV["_"] which is not available to
Windows,
I got to playing around with how to find access to the
initializer_path or in this case the root_path
My question is more about why I don''t have access to what appears to
be a public method than finding the root_path.
I did this in 2.0.2 with script/console
The Rails object has a Configuration
2012 Nov 06
2
rspec failure upon revisit
I just returned from a different project after taking a few weeks off of
my tutorial. I''m using Ruby on Rails 3 Tutorial - Learn Rails by
Example by Michael Hartl.
After rebooting my server I ran an rspec spec/ command to check to see
if there were any problems and this is what I received. I didn''t modify
anything except I did overwrite users_controller.rb and
2006 Jan 17
0
file_column with both root_path and store_dir
I store my file_column database outside of my RAILS_ROOT.
It seems to work in real life, but not in tests.
In the tests, I can''t set both the root_path and the store_dir. In
tests, setting the store_dir option will override the root_path
option. The only way for root_path to work is to remove store_dir. I
think the problem is in file_column.rb on line 22:
options[:store_dir]
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here:
http://railstutorial.org/chapters/sign-in-sign-out#top
At the end of the tutorial, rails is erroring (see below). being new
to Rails and after having checked the tutorial... How do you resolve
this kind of error. It''s saying current_user is not defined, and it is
supposed to be defined with/Sites/sample_app/app/helpers/
2011 Oct 02
5
tutorial: gravatar_image_tag problem
Hi all,
Still working through the Hartl tutorials. Making progress but am hitting
(another) wall.
The repository is on github at: git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:aamax/sample_app.git if you
want to see the code. I''ve pretty much followed the tutorial exactly except
I am using rails 3.1.0 rather than 3.0.1 and some of the other gem versions
are different.
I
2012 Dec 28
3
installing ruby 1.9.3 in michael hartl's ruby on rails tutorial
I''m working on Michael Hartl''s ruby on rails tutorial
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-development_tools
.
I installed Git, updated my OS to 10.8.2 and downloaded XCode 4.5.2.
when I type in
rvm install 1.9.3
this long thing comes up...
Ruby (and needed base gems) for your selection will be installed shortly.
Before it happens, please read and
2002 Feb 27
2
static link
hi,
i have downloaded the linux-version of openssh-3.0.2p1. i wanted
to compile it statically with the following configure-statement:
./configure --prefix=/usr/local/opt/openssh-3.0.2p1 --with-pam
--with-md5-passwords --with-v4-default --with-ldflags=-static
--with-ssl-dir=/usr/local/opt/openssl
It worked for the older 2.9 version, but now i get the following error:
gcc -o ssh ssh.o