no action after running rails generate controller Sessions command

21 views
Skip to first unread message

Toby Toby

unread,
Jun 27, 2014, 2:17:51 PM6/27/14
to rubyonra...@googlegroups.com
Hi, I am new to RoR and looking into this tutorial
(http://www.railstutorial.org/book/sign_in_out#cha-sign_in_sign_out) on
implementing a sign-in page. When I run this command: "rails generate
controller Sessions --no-test-framework" the rails program just gives me
the command line arguments again. Thanks for any help!

-Toby

--
Posted via http://www.ruby-forum.com/.

Colin Law

unread,
Jun 27, 2014, 4:53:02 PM6/27/14
to rubyonra...@googlegroups.com
On 27 June 2014 19:14, Toby Toby <li...@ruby-forum.com> wrote:
> Hi, I am new to RoR and looking into this tutorial
> (http://www.railstutorial.org/book/sign_in_out#cha-sign_in_sign_out) on
> implementing a sign-in page. When I run this command: "rails generate
> controller Sessions --no-test-framework" the rails program just gives me
> the command line arguments again. Thanks for any help!

What operating system are you using and which version of rails (use
rails -v to check)?

Please copy/paste the command you type and the response so that we can
see exactly what it says. Depending on your OS you may have to use
ctrl shift C to copy from the terminal.

Colin

Toby Toby

unread,
Jun 27, 2014, 7:08:14 PM6/27/14
to rubyonra...@googlegroups.com
Hi Colin, thanks for your answer. It is Rails Version 4.0.2. The command
is the one above the output are rails usage options:
"Usage:
rails new APP_PATH [options]
..."

Thanks

Toby Toby

unread,
Jun 27, 2014, 7:43:15 PM6/27/14
to rubyonra...@googlegroups.com
I removed Ruby and then reinstalled Rails and then got Rails version
3.2.16. but the same behavior when running the command.

Colin Law

unread,
Jun 28, 2014, 2:46:57 AM6/28/14
to rubyonra...@googlegroups.com
On 28 June 2014 00:06, Toby Toby <li...@ruby-forum.com> wrote:
> Hi Colin, thanks for your answer. It is Rails Version 4.0.2. The command
> is the one above the output are rails usage options:
> "Usage:
> rails new APP_PATH [options]
> ..."

Please quote the previous message when replying so that it is easier
to follow the thread. If you look at my question you will see that I
asked you to copy/paste the complete terminal display, including the
command you typed. Please do that (don't re-type it, copy/paste is
the only way we can check for typos). No need to copy after the
"Usage" line however.

Make sure you are in the top level folder of the application you have
already created when you do that.

Also please copy/paste the command and the result of rails -v.

Also you have not told us which operating system you are using. We
cannot easily help if you do not answer questions.

When replying insert your answers after each of my questions, then you
will not forget to answer one of them. Thanks

Colin

Toby Toby

unread,
Jun 28, 2014, 2:15:18 PM6/28/14
to rubyonra...@googlegroups.com
I am running on Ubuntu. I think I am missing some code as I am running
this command in an empty directory. The book says to check out some code
("git checkout master" and "git checkout -b sign-up") but I did not find
the URLs for these .. do I need them in order to run the "generate
controller" command?

Thanks

Colin Law

unread,
Jun 28, 2014, 3:04:22 PM6/28/14
to rubyonra...@googlegroups.com
On 28 June 2014 19:13, Toby Toby <li...@ruby-forum.com> wrote:
> I am running on Ubuntu. I think I am missing some code as I am running
> this command in an empty directory. The book says to check out some code
> ("git checkout master" and "git checkout -b sign-up") but I did not find
> the URLs for these .. do I need them in order to run the "generate
> controller" command?

Yes, you are missing the rails application. You should have got to
this chapter via the preceding chapters. You can't just jump into the
middle of the tutorial, you must start from the beginning.

Colin
Reply all
Reply to author
Forward
0 new messages