Clone from Github errors when activating Rails server


#1

mjw:~/workspace/turtle1_saas (master) $ rails s -b $IP -p $PORT
/usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.1.0/lib/active_support/values/time_zone.rb:285: warning: circular argument reference - now
=> Booting WEBrick
=> Rails 4.1.0 application starting in development on http://0.0.0.0:8080
=> Run rails server -h for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (–binding option)
=> Ctrl-C to shutdown server
Exiting
/usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:238:in const_get': uninitialized constant User (NameError) from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:238:inblock in constantize’
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:236:in each' from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:236:ininject’
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:236:in constantize' from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise.rb:302:inget’
from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/mapping.rb:80:in to' from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/mapping.rb:75:inmodules’
from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/mapping.rb:92:in routes' from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/mapping.rb:159:indefault_used_route’
from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/mapping.rb:69:in initialize' from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise.rb:336:innew’
from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise.rb:336:in add_mapping' from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/rails/routes.rb:224:inblock in devise_for’
from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:in each' from /usr/local/rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/rails/routes.rb:223:indevise_for’
from /home/ubuntu/workspace/turtle1_saas/config/routes.rb:2:in block in <top (required)>' from /usr/local/rvm/gems/ruby-2.2.1/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:335:ininstance_exec’
from /usr/local/rvm/gems/ruby-2.2.1/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:335:in eval_block' from /usr/local/rvm/gems/ruby-2.2.1/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:313:indraw’
from /home/ubuntu/workspace/turtle1_saas/config/routes.rb:1:in <top (required)>' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/application/routes_reloader.rb:40:inblock in load_paths’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/application/routes_reloader.rb:40:in each' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/application/routes_reloader.rb:40:inload_paths’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/application/routes_reloader.rb:16:in reload!' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/application/routes_reloader.rb:26:inblock in updater’
from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.1.0/lib/active_support/file_update_checker.rb:75:in call' from /usr/local/rvm/gems/ruby-2.2.1/gems/activesupport-4.1.0/lib/active_support/file_update_checker.rb:75:inexecute’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/application/routes_reloader.rb:27:in updater' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/application/routes_reloader.rb:7:inexecute_if_updated’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/application/finisher.rb:71:in block in <module:Finisher>' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/initializable.rb:30:ininstance_exec’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/initializable.rb:30:in run' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/initializable.rb:55:inblock in run_initializers’
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in block in tsort_each' from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:inblock (2 levels) in each_strongly_connected_component’
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in each_strongly_connected_component_from' from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:inblock in each_strongly_connected_component’
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in each' from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:incall’
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in each_strongly_connected_component' from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:intsort_each’
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in tsort_each' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/initializable.rb:54:inrun_initializers’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/application.rb:288:in initialize!' from /home/ubuntu/workspace/turtle1_saas/config/environment.rb:5:in<top (required)>'
from /home/ubuntu/workspace/turtle1_saas/config.ru:3:in block in <main>' from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/builder.rb:55:ininstance_eval’
from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/builder.rb:55:in initialize' from /home/ubuntu/workspace/turtle1_saas/config.ru:innew’
from /home/ubuntu/workspace/turtle1_saas/config.ru:in <main>' from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/builder.rb:49:ineval’
from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/builder.rb:49:in new_from_string' from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/builder.rb:40:inparse_file’
from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/server.rb:277:in build_app_and_options_from_config' from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/server.rb:199:inapp’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/server.rb:50:in app' from /usr/local/rvm/gems/ruby-2.2.1/gems/rack-1.5.5/lib/rack/server.rb:314:inwrapped_app’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/server.rb:130:in log_to_stdout' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/server.rb:67:instart’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in block in server' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:intap’
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in server' from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:inrun_command!'
from /usr/local/rvm/gems/ruby-2.2.1/gems/railties-4.1.0/lib/rails/commands.rb:17:in <top (required)>' from /home/ubuntu/workspace/turtle1_saas/bin/rails:9:inrequire’
from /home/ubuntu/workspace/turtle1_saas/bin/rails:9:in <top (required)>' from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.3/lib/spring/client/rails.rb:28:inload’
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.3/lib/spring/client/rails.rb:28:in call' from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.3/lib/spring/client/command.rb:7:incall’
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.3/lib/spring/client.rb:28:in run' from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.3/bin/spring:49:in<top (required)>'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.3/lib/spring/binstub.rb:11:in load' from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.3/lib/spring/binstub.rb:11:in<top (required)>'
from /home/ubuntu/workspace/turtle1_saas/bin/spring:13:in require' from /home/ubuntu/workspace/turtle1_saas/bin/spring:13:in<top (required)>'
from bin/rails:3:in load' from bin/rails:3:in


#2

Try running bundle install first.


#3

I ran bundle install as suggested. Then I got the following error message when starting the Rails server.

Migrations are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV=development

so then I ran that and got

ActiveRecord::RecordNotFound in PagesController#home

Couldn’t find Plan with ‘id’=1

Extracted source (around line #3):

1
2
3
4
5
6

class PagesController < ApplicationController
def home
@basic_plan = Plan.find(1)
@pro_plan = Plan.find(2)
end
And I am stuck. I have 3 git repositories and an an experiment tried to close and display each receiving same error messages. I am sure I messed this all up but would sure appreciate any guidance. I am happy to pay someone to fix this for me.

Thanks

marty


#4

That means you need to run your database migrations. You can do so with:

rake db:migrate

Then try running your Rails server again.