Question: I want the user to have a own page, /users/52. So I did add a new controller o make this happen, the controller is user\_controller.rb.
But now, the other functionalities dosen't work. 

When I have routes like below. The /users/sign\_in doesn't work. 
But the /users/1 does work. 

```
#Users/show!!!
  match 'users/:id' => 'users#show', via: :get
  # or 
  get 'users/:id' => 'users#show'
  # or
  resources :users

  devise_for :users, controllers: {
          sessions: 'users/sessions'
  }

```

When I use routes like below. The /users/1 dosen't work but the users/sign\_in work.

```html

  devise_for :users, controllers: {
          sessions: 'users/sessions'
  }
```

```html
class UsersController < ApplicationController

#def show
# @user = User.friendly.find(params[:id])
# @links = Link.all.where(user_id: @user).publish
#end

def index
 @users = User.all
end

def show

 @user = User.friendly.find(params[:id])
 @links = Link.all.where(user_id: @user).publish
end

def new

end

end
```

Answer: 
To resolve `NameError`:

* You need to move configuration of FactoryGirl to `/spec/rails_helper.rb` from `/spec/spec_helper.rb`.
* You need to replace `spec_helper` with `rails helper` in `/spec/model/user_spec.rb`.

Please, try it.
Are you using rspec 3 by any chance?
Starting from rspec 3, you need `require 'rails_helper'` instead of `spec_helper`.

See <https://github.com/rspec/rspec-rails#upgrade-note>