Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find table 'projects'. #2

Open
sandipsubedi opened this issue Jan 17, 2018 · 3 comments
Open

Could not find table 'projects'. #2

sandipsubedi opened this issue Jan 17, 2018 · 3 comments

Comments

@sandipsubedi
Copy link

sandipsubedi commented Jan 17, 2018

I am getting this error :

Started GET "/" for 127.0.0.1 at 2018-01-17 11:04:28 -0600
  Processing by ProjectsController#index as HTML
Completed 500 Internal Server Error in 0ms

ActiveRecord::StatementInvalid (Could not find table 'projects'):
  app/controllers/projects_controller.rb:5:in `index'

Do I have to do anything after bundle install ?

@nathanvda
Copy link
Owner

Did you do rake db:setup ?

@sandipsubedi
Copy link
Author

sandipsubedi commented Jan 18, 2018

That fixed that issue. But when I click on New Project, I am getting following error:

Error during failsafe response: String can't be coerced into Integer
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/actionpack-3.1.1/lib/action_view/template/error.rb:96:in `+'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/actionpack-3.1.1/lib/action_view/template/error.rb:96:in `sum'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/actionpack-3.1.1/lib/action_view/template/error.rb:96:in `source_extract'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/actionpack-3.1.1/lib/action_view/template/error.rb:116:in `annoted_source_code'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/show_exceptions.rb:131:in `block in log_error'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/activesupport-3.1.1/lib/active_support/deprecation/reporting.rb:20:in `silence'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/show_exceptions.rb:129:in `log_error'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/show_exceptions.rb:64:in `render_exception'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/show_exceptions.rb:59:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/railties-3.1.1/lib/rails/rack/logger.rb:13:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/rack-1.3.10/lib/rack/methodoverride.rb:24:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/rack-1.3.10/lib/rack/runtime.rb:17:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/activesupport-3.1.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/rack-1.3.10/lib/rack/lock.rb:15:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/actionpack-3.1.1/lib/action_dispatch/middleware/static.rb:53:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/railties-3.1.1/lib/rails/engine.rb:456:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/railties-3.1.1/lib/rails/rack/content_length.rb:16:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/railties-3.1.1/lib/rails/rack/log_tailer.rb:14:in `call'
  /Users/ss054765/.rvm/gems/ruby-2.4.1/gems/rack-1.3.10/lib/rack/handler/webrick.rb:59:in `service'
  /Users/ss054765/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/webrick/httpserver.rb:140:in `service'
  /Users/ss054765/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/webrick/httpserver.rb:96:in `run'
  /Users/ss054765/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/webrick/server.rb:290:in `block in start_thread'


Started GET "/projects/new" for 127.0.0.1 at 2018-01-18 10:22:55 -0600
  Processing by ProjectsController#new as HTML
Rendered projects/_task_fields.html.haml (6.5ms)
Rendered projects/_form.html.haml (157.9ms)
Rendered projects/new.html.haml within layouts/application (263.0ms)
Completed 500 Internal Server Error in 342ms

@nathanvda
Copy link
Owner

You do realise this example project is very old? The example project that I am supporting is https://github.com/nathanvda/cocoon_simple_form_demo

Unless you changed anything in the code (I mean: that stack-trace not in anything I wrote), I am guessing your error is caused because you are using ruby 2.4. At the time we were using 1.9.3 but I guess it should work with a ruby 2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants