Witam,
mam stronkę, którą testuję na linuxpl
http://sirwhite.linuxpl.info/
strona wczytuje się długo, a Panowie admini mówią, że tak ma być - albo dopłacę to mi ustawią przez proxy nasłuchiwanie na aplikację.
Postanowiłem spróbować swoich sił i wrzucić ją na heroku (tak jak mi tutaj koledzy doradzali).
Oto ona
http://arcane-reaches-9980.herokuapp.com/
Problemy:
-
Nie wczytują się zdjęcia
2014-01-12T18:18:00.846556+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in
run' 2014-01-12T18:18:00.846556+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in
block in start_thread’
2014-01-12T18:18:00.846556+00:00 app[web.1]:
2014-01-12T18:18:00.820347+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] “/assets/galeria/6/medium/100_4536.JPG”)
:
2014-01-12T18:18:00.917455+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:inblock in start_thread' 2014-01-12T18:18:00.975666+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:in
tagged’
2014-01-12T18:18:00.971149+00:00 app[web.1]: Started GET “/assets/galeria/10/medium/6.JPG?1377695212” for 178.37.139.68 at 2014-01-12 18:18:
00 +0000
2014-01-12T18:18:00.975666+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:inblock in call' 2014-01-12T18:18:00.851521+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_dispatch/middleware/show_exception s.rb:56:in
call’
2014-01-12T18:18:00.851521+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:inblock in call' 2014-01-12T18:18:00.851521+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/rack/logger.rb:32:in
call_app’
2014-01-12T18:18:00.846372+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:inforward' 2014-01-12T18:18:00.846372+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in
fetch’
2014-01-12T18:18:00.975847+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:incall' 2014-01-12T18:18:00.975666+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:in
call’
2014-01-12T18:18:00.975666+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/rack/logger.rb:32:incall_app' 2014-01-12T18:18:00.975847+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in
call’
2014-01-12T18:18:00.975847+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:incall' 2014-01-12T18:18:00.851750+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in
lookup’
2014-01-12T18:18:00.851750+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:incall!' 2014-01-12T18:18:00.846556+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in
service’
2014-01-12T18:18:00.846556+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:inservice' 2014-01-12T18:18:00.975996+00:00 app[web.1]: 2014-01-12T18:18:00.975996+00:00 app[web.1]: 2014-01-12T18:18:00.975996+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:479:in
call’
2014-01-12T18:18:00.975996+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:inblock in start_thread' 2014-01-12T18:18:00.917087+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:in
block in call’
2014-01-12T18:18:00.917087+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:in
tagged' 2014-01-12T18:18:00.917087+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:in
call’
2014-01-12T18:18:00.851750+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:i
ncall' 2014-01-12T18:18:00.851521+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/galeria/8/medium/100_4525.JPG") : 2014-01-12T18:18:00.917294+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in
fetch’
2014-01-12T18:18:00.917294+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:inlookup' 2014-01-12T18:18:00.917294+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in
call!’
2014-01-12T18:18:00.917294+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb:15:incall' 2014-01-12T18:18:00.851750+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in
forward’
2014-01-12T18:18:00.851521+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptio
ns.rb:21:incall' 2014-01-12T18:18:00.917455+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/rack/log_tailer.rb:17:in
call’
2014-01-12T18:18:00.917455+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:inservice' 2014-01-12T18:18:00.917455+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in
service’
2014-01-12T18:18:00.917455+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:inrun' 2014-01-12T18:18:00.917087+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_dispatch/middleware/show_exception s.rb:56:in
call’
2014-01-12T18:18:00.975666+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] “/assets/galeria/10/medium/6.JPG”):
2014-01-12T18:18:00.975666+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_dispatch/middleware/show_exception
s.rb:56:incall' 2014-01-12T18:18:00.975666+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptio ns.rb:21:in
call’
2014-01-12T18:18:00.917294+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:i
ncall' 2014-01-12T18:18:00.975666+00:00 app[web.1]: Served asset /galeria/10/medium/6.JPG - 404 Not Found (1ms) 2014-01-12T18:18:00.975847+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in
forward’
Jak widać z tego kawałka kodu wywala 404 i problemy z routingiem.
Próbowałem, robiłem:
rake assets:clean
rake assets:precompile RAILS_ENV=production
zainstalowałem sprockets
w production.rb mam
config.cache_classes = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_assets = true
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
config.assets.compress = true
config.assets.compile = true
config.assets.digest = true
a application.rb mam tak (bo inaczej wywalało na heroku push master )
config.assets.initialize_on_precompile = false
-
Korzystam z devise i pomimo, iż loguję się jako admin nie mam żadnych uprawnień admina - wygląda to jakbym zalogował się na zwykłego usera.
Oto log2014-01-12T18:34:58.882499+00:00 app[web.1]: Started POST “/users/sign_in” for 178.37.139.68 at 2014-01-12 18:34:58 +0000
2014-01-12T18:34:58.886152+00:00 app[web.1]: Parameters: {“utf8”=>“✓”, “authenticity_token”=>“2dKhtQVubp4Mnf+NWa2NPN1ccXAbduAmwW9ugEN//M4=”, “user”=>{“email”=>
"xxx@gmail.com", “password”=>"[FILTERED]", “remember_me”=>“0”}, “commit”=>“Sign in”}
2014-01-12T18:34:58.886152+00:00 app[web.1]: Processing by Devise::SessionsController#create as HTML
2014-01-12T18:34:59.076375+00:00 app[web.1]: Completed 302 Found in 190ms (ActiveRecord: 0.0ms)
2014-01-12T18:34:59.076375+00:00 app[web.1]: Redirected to http://arcane-reaches-9980.herokuapp.com/
2014-01-12T18:34:59.341310+00:00 app[web.1]: Started GET “/” for 178.37.139.68 at 2014-01-12 18:34:59 +0000
2014-01-12T18:34:59.436079+00:00 app[web.1]: Rendered pages/home.html.erb within layouts/application (0.4ms)
2014-01-12T18:34:59.356888+00:00 app[web.1]: Processing by PagesController#home as HTML
2014-01-12T18:34:59.473948+00:00 app[web.1]: Completed 200 OK in 117ms (Views: 43.0ms | ActiveRecord: 28.6ms)
2014-01-12T18:34:59.858417+00:00 heroku[router]: at=info method=GET path=/assets/img/promocje/promocja_2014-bc709758b1ce3d30f8e693f672a1f477.png host=arcane-reac
hes-9980.herokuapp.com fwd=“178.37.139.68” dyno=web.1 connect=3ms service=9ms status=304 bytes=0
2014-01-12T18:35:04.355311+00:00 app[web.1]: Rendered users/index.html.erb within layouts/application (0.1ms)
2014-01-12T18:35:04.379584+00:00 app[web.1]: Completed 200 OK in 57ms (Views: 23.5ms | ActiveRecord: 10.6ms)
2014-01-12T18:35:04.316366+00:00 app[web.1]: Started GET “/users” for 178.37.139.68 at 2014-01-12 18:35:04 +0000
2014-01-12T18:35:04.321672+00:00 app[web.1]: Processing by UsersController#index as HTML
2014-01-12T18:35:04.378663+00:00 heroku[router]: at=info method=GET path=/users host=arcane-reaches-9980.herokuapp.com fwd=“178.37.139.68” dyno=web.1 connect=3ms
service=78ms status=200 bytes=10354
Nic w tym logu nie widzę.
Proszę o pomoc, bo mi się pomysły skończyły : (