# Devise issue

**URL:** <https://www.ruby-forum.com/t/devise-issue/192946>\
**Category:** Rails\
**Created:** [August 8, 2010, 11:59pm UTC](https://www.ruby-forum.com/t/devise-issue/192946 "2010-08-08T23:59:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 8, 2010, 11:59pm UTC](https://www.ruby-forum.com/t/devise-issue/192946/1 "2010-08-08T23:59:29Z")

</div>

I’m following the devise Rails cast here:

> **[\#209 Introducing Devise - RailsCasts](http://railscasts.com/episodes/209-introducing-devise)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.

After I signup, I get the following:

[http://paste.pocoo.org/show/247793/](http://paste.pocoo.org/show/247793/)

Provided that I’m using Rails3.0.0.rc.

Any ideas?

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 9, 2010, 12:06am UTC](https://www.ruby-forum.com/t/devise-issue/192946/2 "2010-08-09T00:06:31Z")

</div>

I have now removed :confirmable from user.rb, and got:

undefined local variable or method `root\_path’ for  
#Devise::RegistrationsController:0x25327b0

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 9, 2010, 12:17am UTC](https://www.ruby-forum.com/t/devise-issue/192946/3 "2010-08-09T00:17:40Z")

</div>

Ensure that something is mapped to the root path. In rails 2.3 it would  
be something like this in config/routes.rb:

map.root, :controller =\> “home”

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 9, 2010, 12:41am UTC](https://www.ruby-forum.com/t/devise-issue/192946/4 "2010-08-09T00:41:07Z")

</div>

Patrick R. wrote:

> Ensure that something is mapped to the root path. In rails 2.3 it would  
> be something like this in config/routes.rb:
> 
> map.root, :controller =\> “home”
> 
> Sent from my iPhone

Thanks. Yes, I think there is a problem with the routs. I’m creating the  
application from scratch though, and this is where I’m at:  
[http://www.ruby-forum.com/topic/214614#931504](http://www.ruby-forum.com/topic/214614#931504)

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 9, 2010, 12:58am UTC](https://www.ruby-forum.com/t/devise-issue/192946/5 "2010-08-09T00:58:04Z")

</div>

> Thanks. Yes, I think there is a problem with the routs. I’m creating the  
> application from scratch though, and this is where I’m at:  
> [http://www.ruby-forum.com/topic/214614#931504](http://www.ruby-forum.com/topic/214614#931504)

The Rails 3 equivalent would be  
root :to =\> ‘pages#home’

That is assuming you get the pages controller with the home action  
working  
properly in the other thread!

-Patrick R.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 9, 2010, 1:09am UTC](https://www.ruby-forum.com/t/devise-issue/192946/6 "2010-08-09T01:09:55Z")

</div>

Patrick R. wrote:

> > Thanks. Yes, I think there is a problem with the routs. I’m creating the  
> > application from scratch though, and this is where I’m at:  
> > [http://www.ruby-forum.com/topic/214614#931504](http://www.ruby-forum.com/topic/214614#931504)
> 
> The Rails 3 equivalent would be  
> root :to =\> ‘pages#home’
> 
> That is assuming you get the pages controller with the home action  
> working  
> properly in the other thread!
> 
> -Patrick R.

Now, this is what my routes.rb file look like:

[http://paste.pocoo.org/show/247808/](http://paste.pocoo.org/show/247808/)

The problem is when I try to navigate to:  
[http://localhost:3000/users/sign\_up](http://localhost:3000/users/sign_up)

I just redirected to: [http://localhost:3000](http://localhost:3000) automatically and not able  
to open the signup page. Why is that?

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 9, 2010, 1:30am UTC](https://www.ruby-forum.com/t/devise-issue/192946/7 "2010-08-09T01:30:52Z")

</div>

Thanks a lot Patrick.

So, this is how my “user.rb” file looks like:

[http://paste.pocoo.org/show/fEKtgXkB8WfHL3aBzmdh/](http://paste.pocoo.org/show/fEKtgXkB8WfHL3aBzmdh/)

Abd, as for $ tail -f log/development.log

[http://paste.pocoo.org/show/IxpFou9RMrDF8LOwSVKl/](http://paste.pocoo.org/show/IxpFou9RMrDF8LOwSVKl/)

Makes anything clear here?

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 9, 2010, 1:51am UTC](https://www.ruby-forum.com/t/devise-issue/192946/8 "2010-08-09T01:51:54Z")

</div>

Following the tutorial, it seems that it redirects to:  
[http://localhost:3000](http://localhost:3000), and this seems to be intended to be.

I have removed index.html from the “public” directory.

The tutorial shows the index of the projects.

Since I’m somehow new to Rails, how can I make my Project controller  
index be the index.html page, such that it displays when going to:  
[http://localhost:3000](http://localhost:3000)?

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 9, 2010, 3:06am UTC](https://www.ruby-forum.com/t/devise-issue/192946/9 "2010-08-09T03:06:12Z")

</div>

I want to mention that I started the application from scratch once again  
and it worked.

I don’t know exactly what I was missing.

Thanks for all your replies.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [August 9, 2010, 1:20am UTC](https://www.ruby-forum.com/t/devise-issue/192946/10 "2010-08-09T01:20:19Z")

</div>

> 

An excellent question! I would tail the development log:  
tail -f log/development.log

That might give you some insight as to why it is directing you to the  
root  
path instead of the registrations controller new action. Generally  
speaking, it should pretty much work out of the box. You might need to  
define one of the user fields as an attr\_accessor or you might be  
missing a  
strategy in the line “devise :database\_authenticatable, etc, etc” line.  
My  
experience is almost entirely on the rails 2.3 branch of devise; perhaps  
someone else in the group might have a bit of wisdom on the 3.0 branch.

-Patrick R.
