Closed spvkavitha closed 9 years ago
Going to be hard to help without the source :)
heroku run rails console Forem::Category.count Forem::Forum.count
You don't have any data.
On 20 Jul 2015, at 18:15, spvkavitha notifications@github.com wrote:
I followed the tutorial and it is all working fine in localhost. When I push the app to heroku: https://freeskies.herokuapp.com/forums/ the forums page only shows the FORUMS title and nothing else. I can upload Heroku logs if that provide needed information.
— Reply to this email directly or view it on GitHub.
Radar: Thanks for your note. I run the command you suggested and there is no data as you mentioned. How can I add data? In local host, I can see new topic button and added a post but not sure what to do Heroku server. Sorry, if it is too basic question. Jake0oo0 : I pushed my code at Bitbucket so not sure how I can share the source code.
Running rails console
attached to terminal... up, run.6813
Loading production environment (Rails 4.1.5)
irb(main):001:0> Forem::Category.count
=> 0
irb(main):002:0> Forem::Forum.count
=> 0
@spvkavitha You can update your user's forem_admin
attribute to true
so that you can access the forem control panel from the forem root, or you can manually create categories and forums similarly to how it is done here.
@Jake0oo0 I have added the seeds.rb but still it shows do data.
-- Still getting
Running rails console
attached to terminal... up, run.3491
Loading production environment (Rails 4.1.5)
irb(main):001:0> Forem::Category.count
=> 0
irb(main):002:0> Forem::Forum.count
=> 0
irb(main):003:0>
Heroku logs for https://freeskies.herokuapp.com/forums/
]: 2015-07-21T14:38:20.681391+00:00 app[web.1]: Processing by Forem::ForumsController#show as HTML 2015-07-21T14:38:20.681481+00:00 app[web.1]: Parameters: {"id"=>"default"} 2015-07-21T14:38:20.696868+00:00 app[web.1]: Completed 404 Not Found in 15ms 2015-07-21T14:42:02.174087+00:00 app[web.1]: Started GET "/forums/" for 98.207.85.125 at 2015-07-21 14:42:02 +0000 2015-07-21T14:42:02.198301+00:00 app[web.1]: Rendered collection (0.0ms) 2015-07-21T14:42:02.201171+00:00 app[web.1]: Rendered layouts/_navigation_links.html.erb (0.0ms) 2015-07-21T14:42:02.214177+00:00 app[web.1]: Rendered layouts/_messages.html.erb (0.1ms) 2015-07-21T14:42:02.215051+00:00 app[web.1]: Completed 200 OK in 29ms (Views: 17.8ms | ActiveRecord: 10.2ms) 2015-07-21T14:42:02.199539+00:00 app[web.1]: Rendered forem/forums/index.html.erb within layouts/application (12.2ms) 2015-07-21T14:42:02.182157+00:00 app[web.1]: Processing by Forem::ForumsController#index as HTML 2015-07-21T14:42:02.206699+00:00 app[web.1]: Rendered layouts/_navigation.html.erb (5.9ms) 2015-07-21T14:42:02.214487+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.0ms) 2015-07-21T14:42:02.231009+00:00 heroku[router]: at=info method=GET path="/forums/" host=freeskies.herokuapp.com request_id=cf617d4a-e426-49a7-ae44-48bb0f984ce8 fwd="98.207.85.125" dyno=web.1 connect=1ms service=63ms status=304 bytes=738 2015-07-21T14:42:04.520761+00:00 app[web.1]: Started GET "/users/sign_in" for 98.207.85.125 at 2015-07-21 14:42:04 +0000 2015-07-21T14:42:04.540200+00:00 app[web.1]: Rendered users/sessions/new.html.erb within layouts/application (12.8ms) 2015-07-21T14:42:04.540151+00:00 app[web.1]: Rendered devise/shared/_links.html.erb (0.5ms) 2015-07-21T14:42:04.541126+00:00 app[web.1]: Rendered layouts/_navigation_links.html.erb (0.0ms) 2015-07-21T14:42:04.542080+00:00 app[web.1]: Rendered layouts/_messages.html.erb (0.0ms) 2015-07-21T14:42:04.542246+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.0ms) 2015-07-21T14:42:04.542523+00:00 app[web.1]: Completed 200 OK in 18ms (Views: 15.4ms | ActiveRecord: 0.0ms) 2015-07-21T14:42:04.524133+00:00 app[web.1]: Processing by Users::SessionsController#new as HTML 2015-07-21T14:42:04.541940+00:00 app[web.1]: Rendered layouts/_navigation.html.erb (1.1ms) 2015-07-21T14:42:04.545009+00:00 heroku[router]: at=info method=GET path="/users/sign_in" host=freeskies.herokuapp.com request_id=b1abf19b-a23b-4509-b9e2-34d3c75d5135 fwd="98.207.85.125" dyno=web.1 connect=2ms service=26ms status=304 bytes=738 2015-07-21T14:42:05.790281+00:00 heroku[router]: at=info method=GET path="/" host=freeskies.herokuapp.com request_id=ba7dbe85-c709-4d3b-b4ff-a135f9981bc2 fwd="98.207.85.125" dyno=web.1 connect=2ms service=93ms status=304 bytes=738 2015-07-21T14:42:05.706215+00:00 app[web.1]: Started GET "/" for 98.207.85.125 at 2015-07-21 14:42:05 +0000 2015-07-21T14:42:05.780385+00:00 app[web.1]: Rendered layouts/_navigation.html.erb (5.9ms) 2015-07-21T14:42:05.773224+00:00 app[web.1]: Rendered visitors/index.html.erb within layouts/application (62.1ms) 2015-07-21T14:42:05.786131+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.0ms) 2015-07-21T14:42:05.709672+00:00 app[web.1]: Processing by VisitorsController#index as HTML 2015-07-21T14:42:05.774762+00:00 app[web.1]: Rendered layouts/_navigation_links.html.erb (0.0ms) 2015-07-21T14:42:05.786444+00:00 app[web.1]: Completed 200 OK in 77ms (Views: 75.6ms | ActiveRecord: 0.0ms) 2015-07-21T14:42:05.785865+00:00 app[web.1]: Rendered layouts/_messages.html.erb (0.1ms) 2015-07-21T14:42:07.282942+00:00 heroku[router]: at=info method=GET path="/forums/" host=freeskies.herokuapp.com request_id=eb542c84-089f-4bce-ba84-c08de0ab584d fwd="98.207.85.125" dyno=web.1 connect=2ms service=41ms status=304 bytes=738 2015-07-21T14:42:07.240783+00:00 app[web.1]: Started GET "/forums/" for 98.207.85.125 at 2015-07-21 14:42:07 +0000 2015-07-21T14:42:07.253252+00:00 app[web.1]: Rendered collection (0.0ms) 2015-07-21T14:42:07.255722+00:00 app[web.1]: Rendered layouts/_navigation_links.html.erb (0.0ms) 2015-07-21T14:42:07.262241+00:00 app[web.1]: Rendered layouts/_messages.html.erb (0.1ms) 2015-07-21T14:42:07.262730+00:00 app[web.1]: Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 2.3ms) 2015-07-21T14:42:07.249094+00:00 app[web.1]: Processing by Forem::ForumsController#index as HTML 2015-07-21T14:42:07.254344+00:00 app[web.1]: Rendered forem/forums/index.html.erb within layouts/application (3.9ms) 2015-07-21T14:42:07.258454+00:00 app[web.1]: Rendered layouts/_navigation.html.erb (3.1ms) 2015-07-21T14:42:07.262404+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.0ms)
Rendered layouts/_footer.html.erb (0.1ms)
2015-07-21T14:37:14.372322+00:00 app[web.1]: Started GET "/forums/categories/general" for 98.207.85.125 at 2015-07-21 14:37:14 +0000
2015-07-21T14:37:14.381177+00:00 app[web.1]: Processing by Forem::CategoriesController#show as HTML
2015-07-21T14:37:14.381253+00:00 app[web.1]: Parameters: {"id"=>"general"}
2015-07-21T14:37:15.105187+00:00 heroku[router]: at=info method=GET path="/forums/categories/general" host=freeskies.herokuapp.com request_id=2fc5f6a4-e647-47af-9d8d-7b12bf77408e fwd="98.207.85.125" dyno=web.1 connect=1ms service=732ms status=404 bytes=1829
2015-07-21T14:37:15.089366+00:00 app[web.1]: Completed 404 Not Found in 708ms
2015-07-21T14:37:15.091273+00:00 app[web.1]:
2015-07-21T14:37:15.091275+00:00 app[web.1]: ActiveRecord::RecordNotFound (ActiveRecord::RecordNotFound):
2015-07-21T14:37:15.091278+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/querying.rb:3:in find' 2015-07-21T14:37:15.091277+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/friendly_id-5.0.5/lib/friendly_id/finder_methods.rb:23:in
find'
2015-07-21T14:37:15.091280+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/model_adapters/abstract_adapter.rb:20:in find' 2015-07-21T14:37:15.091281+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:111:in
find_resource'
2015-07-21T14:37:15.091284+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:63:in load_resource_instance' 2015-07-21T14:37:15.091285+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:32:in
load_resource'
2015-07-21T14:37:15.091286+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:25:in load_and_authorize_resource' 2015-07-21T14:37:15.091304+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:10:in
block in add_before_filter'
2015-07-21T14:37:15.091306+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:440:in block in make_lambda' 2015-07-21T14:37:15.091305+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:440:in
instance_exec'
2015-07-21T14:37:15.091307+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:in call' 2015-07-21T14:37:15.091309+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:in
block in halting'
2015-07-21T14:37:15.091310+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in call' 2015-07-21T14:37:15.091311+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in
block in halting'
2015-07-21T14:37:15.091312+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
Did you run heroku run rake db:seed?
On 22 Jul 2015, at 00:44, spvkavitha notifications@github.com wrote:
@Jake0oo0 I have added the seeds.rb but still it shows do data. -- Still getting Running rails console attached to terminal... up, run.3491 Loading production environment (Rails 4.1.5) irb(main):001:0> Forem::Category.count => 0 irb(main):002:0> Forem::Forum.count => 0 irb(main):003:0>
Heroku logs for https://freeskies.herokuapp.com/forums/
]: 2015-07-21T14:38:20.681391+00:00 app[web.1]: Processing by Forem::ForumsController#show as HTML 2015-07-21T14:38:20.681481+00:00 app[web.1]: Parameters: {"id"=>"default"} 2015-07-21T14:38:20.696868+00:00 app[web.1]: Completed 404 Not Found in 15ms 2015-07-21T14:42:02.174087+00:00 app[web.1]: Started GET "/forums/" for 98.207.85.125 at 2015-07-21 14:42:02 +0000 2015-07-21T14:42:02.198301+00:00 app[web.1]: Rendered collection (0.0ms) 2015-07-21T14:42:02.201171+00:00 app[web.1]: Rendered layouts/_navigation_links.html.erb (0.0ms) 2015-07-21T14:42:02.214177+00:00 app[web.1]: Rendered layouts/_messages.html.erb (0.1ms) 2015-07-21T14:42:02.215051+00:00 app[web.1]: Completed 200 OK in 29ms (Views: 17.8ms | ActiveRecord: 10.2ms) 2015-07-21T14:42:02.199539+00:00 app[web.1]: Rendered forem/forums/index.html.erb within layouts/application (12.2ms) 2015-07-21T14:42:02.182157+00:00 app[web.1]: Processing by Forem::ForumsController#index as HTML 2015-07-21T14:42:02.206699+00:00 app[web.1]: Rendered layouts/_navigation.html.erb (5.9ms) 2015-07-21T14:42:02.214487+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.0ms) 2015-07-21T14:42:02.231009+00:00 heroku[router]: at=info method=GET path="/forums/" host=freeskies.herokuapp.com request_id=cf617d4a-e426-49a7-ae44-48bb0f984ce8 fwd="98.207.85.125" dyno=web.1 connect=1ms service=63ms status=304 bytes=738 2015-07-21T14:42:04.520761+00:00 app[web.1]: Started GET "/users/sign_in" for 98.207.85.125 at 2015-07-21 14:42:04 +0000 2015-07-21T14:42:04.540200+00:00 app[web.1]: Rendered users/sessions/new.html.erb within layouts/application (12.8ms) 2015-07-21T14:42:04.540151+00:00 app[web.1]: Rendered devise/shared/_links.html.erb (0.5ms) 2015-07-21T14:42:04.541126+00:00 app[web.1]: Rendered layouts/_navigation_links.html.erb (0.0ms) 2015-07-21T14:42:04.542080+00:00 app[web.1]: Rendered layouts/_messages.html.erb (0.0ms) 2015-07-21T14:42:04.542246+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.0ms) 2015-07-21T14:42:04.542523+00:00 app[web.1]: Completed 200 OK in 18ms (Views: 15.4ms | ActiveRecord: 0.0ms) 2015-07-21T14:42:04.524133+00:00 app[web.1]: Processing by Users::SessionsController#new as HTML 2015-07-21T14:42:04.541940+00:00 app[web.1]: Rendered layouts/_navigation.html.erb (1.1ms) 2015-07-21T14:42:04.545009+00:00 heroku[router]: at=info method=GET path="/users/sign_in" host=freeskies.herokuapp.com request_id=b1abf19b-a23b-4509-b9e2-34d3c75d5135 fwd="98.207.85.125" dyno=web.1 connect=2ms service=26ms status=304 bytes=738 2015-07-21T14:42:05.790281+00:00 heroku[router]: at=info method=GET path="/" host=freeskies.herokuapp.com request_id=ba7dbe85-c709-4d3b-b4ff-a135f9981bc2 fwd="98.207.85.125" dyno=web.1 connect=2ms service=93ms status=304 bytes=738 2015-07-21T14:42:05.706215+00:00 app[web.1]: Started GET "/" for 98.207.85.125 at 2015-07-21 14:42:05 +0000 2015-07-21T14:42:05.780385+00:00 app[web.1]: Rendered layouts/_navigation.html.erb (5.9ms) 2015-07-21T14:42:05.773224+00:00 app[web.1]: Rendered visitors/index.html.erb within layouts/application (62.1ms) 2015-07-21T14:42:05.786131+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.0ms) 2015-07-21T14:42:05.709672+00:00 app[web.1]: Processing by VisitorsController#index as HTML 2015-07-21T14:42:05.774762+00:00 app[web.1]: Rendered layouts/_navigation_links.html.erb (0.0ms) 2015-07-21T14:42:05.786444+00:00 app[web.1]: Completed 200 OK in 77ms (Views: 75.6ms | ActiveRecord: 0.0ms) 2015-07-21T14:42:05.785865+00:00 app[web.1]: Rendered layouts/_messages.html.erb (0.1ms) 2015-07-21T14:42:07.282942+00:00 heroku[router]: at=info method=GET path="/forums/" host=freeskies.herokuapp.com request_id=eb542c84-089f-4bce-ba84-c08de0ab584d fwd="98.207.85.125" dyno=web.1 connect=2ms service=41ms status=304 bytes=738 2015-07-21T14:42:07.240783+00:00 app[web.1]: Started GET "/forums/" for 98.207.85.125 at 2015-07-21 14:42:07 +0000 2015-07-21T14:42:07.253252+00:00 app[web.1]: Rendered collection (0.0ms) 2015-07-21T14:42:07.255722+00:00 app[web.1]: Rendered layouts/_navigation_links.html.erb (0.0ms) 2015-07-21T14:42:07.262241+00:00 app[web.1]: Rendered layouts/_messages.html.erb (0.1ms) 2015-07-21T14:42:07.262730+00:00 app[web.1]: Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 2.3ms) 2015-07-21T14:42:07.249094+00:00 app[web.1]: Processing by Forem::ForumsController#index as HTML 2015-07-21T14:42:07.254344+00:00 app[web.1]: Rendered forem/forums/index.html.erb within layouts/application (3.9ms) 2015-07-21T14:42:07.258454+00:00 app[web.1]: Rendered layouts/_navigation.html.erb (3.1ms) 2015-07-21T14:42:07.262404+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.0ms)
Here is heroku logs: While trying to manually access https://freeskies.herokuapp.com/forums/default
Rendered layouts/_footer.html.erb (0.1ms) 2015-07-21T14:37:14.372322+00:00 app[web.1]: Started GET "/forums/categories/general" for 98.207.85.125 at 2015-07-21 14:37:14 +0000 2015-07-21T14:37:14.381177+00:00 app[web.1]: Processing by Forem::CategoriesController#show as HTML 2015-07-21T14:37:14.381253+00:00 app[web.1]: Parameters: {"id"=>"general"} 2015-07-21T14:37:15.105187+00:00 heroku[router]: at=info method=GET path="/forums/categories/general" host=freeskies.herokuapp.com request_id=2fc5f6a4-e647-47af-9d8d-7b12bf77408e fwd="98.207.85.125" dyno=web.1 connect=1ms service=732ms status=404 bytes=1829 2015-07-21T14:37:15.089366+00:00 app[web.1]: Completed 404 Not Found in 708ms 2015-07-21T14:37:15.091273+00:00 app[web.1]: 2015-07-21T14:37:15.091275+00:00 app[web.1]: ActiveRecord::RecordNotFound (ActiveRecord::RecordNotFound): 2015-07-21T14:37:15.091278+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.5/lib/active_record/querying.rb:3:in find' 2015-07-21T14:37:15.091277+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/friendly_id-5.0.5/lib/friendly_id/finder_methods.rb:23:infind' 2015-07-21T14:37:15.091280+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/model_adapters/abstract_adapter.rb:20:in find' 2015-07-21T14:37:15.091281+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:111:infind_resource' 2015-07-21T14:37:15.091284+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:63:in load_resource_instance' 2015-07-21T14:37:15.091285+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:32:inload_resource' 2015-07-21T14:37:15.091286+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:25:in load_and_authorize_resource' 2015-07-21T14:37:15.091304+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/cancancan-1.12.0/lib/cancan/controller_resource.rb:10:inblock in add_before_filter' 2015-07-21T14:37:15.091306+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:440:in block in make_lambda' 2015-07-21T14:37:15.091305+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:440:ininstance_exec' 2015-07-21T14:37:15.091307+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:in call' 2015-07-21T14:37:15.091309+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:inblock in halting' 2015-07-21T14:37:15.091310+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in call' 2015-07-21T14:37:15.091311+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:inblock in halting' 2015-07-21T14:37:15.091312+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
— Reply to this email directly or view it on GitHub.
I did forgot to run that. It is working now. @radar Thanks for your help, this is awesome :)
I followed the tutorial and it is all working fine in localhost. When I push the app to heroku: https://freeskies.herokuapp.com/forums/ the forums page only shows the FORUMS title and nothing else. I can upload Heroku logs if that provide needed information.