"Users" doesn't show Users but errors instead - is this bug?


#1

I am working on Sample app , tutorial and follow the instructions provided.
When I click on Users, I’ve got errors as below and I could not see the users.
Other items are shows just fine. What/if any could be done to see the users?
thanks.

Missing partial users/_user with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in: * "/usr/local/rvm/gems/ruby-2.2.1/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates" * "/home/ubuntu/workspace/sample_app/app/views" * "/usr/local/rvm/gems/ruby-2.2.1/gems/web-console-2.0.0.beta3/app/views"
bundle exec rake test

ERROR["test_index_as_non-admin", UsersIndexTest, 2016-02-11 16:36:20 +0000]
 test_index_as_non-admin#UsersIndexTest (1455208580.24s)
ActionView::Template::Error:         ActionView::Template::Error: Missing partial users/_user with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
          * "/usr/local/rvm/gems/ruby-2.2.1/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates"
          * "/home/ubuntu/workspace/sample_app/app/views"
          * "/usr/local/rvm/gems/ruby-2.2.1/gems/web-console-2.0.0.beta3/app/views"
        
            app/views/users/index.html.erb:7:in `_app_views_users_index_html_erb___3360010834090387855_79378780'
            test/integration/users_index_test.rb:29:in `block in <class:UsersIndexTest>'
        app/views/users/index.html.erb:7:in `_app_views_users_index_html_erb___3360010834090387855_79378780'
        test/integration/users_index_test.rb:29:in `block in <class:UsersIndexTest>'

ERROR["test_index_as_admin_including_pagination_and_delete_links", UsersIndexTest, 2016-02-11 16:36:20 +0000]
 test_index_as_admin_including_pagination_and_delete_links#UsersIndexTest (1455208580.28s)
ActionView::Template::Error:         ActionView::Template::Error: Missing partial users/_user with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
          * "/usr/local/rvm/gems/ruby-2.2.1/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates"
          * "/home/ubuntu/workspace/sample_app/app/views"
          * "/usr/local/rvm/gems/ruby-2.2.1/gems/web-console-2.0.0.beta3/app/views"
        
            app/views/users/index.html.erb:7:in `_app_views_users_index_html_erb___3360010834090387855_79378780'
            test/integration/users_index_test.rb:12:in `block in <class:UsersIndexTest>'
        app/views/users/index.html.erb:7:in `_app_views_users_index_html_erb___3360010834090387855_79378780'
        test/integration/users_index_test.rb:12:in `block in <class:UsersIndexTest>'

ERROR["test_should_redirect_destroy_when_not_logged_in", UsersControllerTest, 2016-02-11 16:36:20 +0000]
 test_should_redirect_destroy_when_not_logged_in#UsersControllerTest (1455208580.51s)
AbstractController::ActionNotFound:         AbstractController::ActionNotFound: The action 'destroy' could not be found for UsersController
            test/controllers/users_controller_test.rb:37:in `block (2 levels) in <class:UsersControllerTest>'
            test/controllers/users_controller_test.rb:36:in `block in <class:UsersControllerTest>'
        test/controllers/users_controller_test.rb:37:in `block (2 levels) in <class:UsersControllerTest>'
        test/controllers/users_controller_test.rb:36:in `block in <class:UsersControllerTest>'

ERROR["test_should_redirect_destroy_when_logged_in_as_a_non-admin", UsersControllerTest, 2016-02-11 16:36:20 +0000]
 test_should_redirect_destroy_when_logged_in_as_a_non-admin#UsersControllerTest (1455208580.52s)
AbstractController::ActionNotFound:         AbstractController::ActionNotFound: The action 'destroy' could not be found for UsersController
            test/controllers/users_controller_test.rb:45:in `block (2 levels) in <class:UsersControllerTest>'
            test/controllers/users_controller_test.rb:44:in `block in <class:UsersControllerTest>'
        test/controllers/users_controller_test.rb:45:in `block (2 levels) in <class:UsersControllerTest>'
        test/controllers/users_controller_test.rb:44:in `block in <class:UsersControllerTest>'

  33/33: [=============================

#2

Hi,

From the error, it seems like you’re missing a file named _user from the partials/users/ directory. Apart from that, I’m afraid I’m not quite sure.

Since this is a code related issue, and not a problem with Cloud9, I think you’ll get much better help if you post this along with a snippet of relevant code / directory structure on StackOverflow.

Regards,
​Mutahhir


#3

Do you know particular branch StackOverflow(Ruby on Rails) that I could connect?
Another question about cloud 9.
How can I transfer all project to Cloud9?
I found similar project on Git, so how could I tran-
safer it on Cloud 9 and see the output of this program?
thanks.


#4

I fixed errer. It happened because i was working on Cloud 9 on branch and supposed to merge but
master branch was already altered on cloud 9… Is it possible on Cloud 9 environment to work on
branch and then merge?
thanks.


#5

Tatyana thats not why you got the error. The way git works is when you create a branch its an exact copy of the master repo. As long as you are on the branch you are working with (git checkout -b working_branch) all errors are valid and should be treated as so. Before you merge any branch with the master repo you should always make sure tests pass and that you have no errors.

As for adding a repo to cloud9 it is as simple as dropping the main folder into cloud9 cd into the directory and remember to initialize (all apps diff) but if your using the tutorial i think you are should only have to use bundle install db:seed and db:migrate and your app should be up and running