Every time i make an action in my web application i get this enormous error which i really can't understand .
This console log is generated after i click "add to favorites" to one classified, which from the SQL side works fine.
After the click i get the error , but if i click "back" in my browser i see the item is "my favorite" .
The error follows :
Started PUT "/classifieds/72/favorite?type=favorite" for 127.0.0.1 at 2016-09-08 21:58:36 +0300
Processing by ClassifiedsController#favorite as HTML
Parameters: {"authenticity_token"=>"yynpSeBi2Jsr+GzGZZWbxmBCZSxXfOvG1NU9L3lX3pafRbtka779xUB18MkZUFPxtvQh7O4siIpPe5gl8XGbyQ==", "type"=>"favorite", "id"=>"72"}
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 4], ["LIMIT", 1]]
Classified Load (0.1ms) SELECT "classifieds".* FROM "classifieds" WHERE "classifieds"."id" = ? LIMIT ? [["id", 72], ["LIMIT", 1]]
(0.1ms) begin transaction
SOLR Request (4.4ms) [ path=update parameters={} ]
SQL (0.4ms) INSERT INTO "favorite_classifieds" ("user_id", "classified_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["user_id", 4], ["classified_id", 72], ["created_at", 2016-09-08 18:58:36 UTC], ["updated_at", 2016-09-08 18:58:36 UTC]]
(20.3ms) commit transaction
DEPRECATION WARNING: `redirect_to :back` is deprecated and will be removed from Rails 5.1. Please use `redirect_back(fallback_location: fallback_location)` where `fallback_location` represents the location to use if the request has no HTTP referer information. (called from favorite at /home/frcake/workspace/Site/brokerv1/brokr/app/controllers/classifieds_controller.rb:79)
Redirected to http://localhost:3000/classifieds/72
SOLR Request (12.5ms) [ path=update parameters={} ]
Completed 500 Internal Server Error in 50ms (ActiveRecord: 21.1ms)
RSolr::Error::Http (RSolr::Error::Http - 500 Internal Server Error
Error: 'java.nio.file.NoSuchFileException: /home/frcake/workspace/Site/brokerv1/brokr/solr/development/data/index/_41.fdt','trace'=>'java.lang.RuntimeException: java.nio.file.NoSuchFileException: /home/frcake/workspace/Site/brokerv1/brokr/solr/development/data/index/_41.fdt
URI: http://localhost:8982/solr/development/update?wt=ruby
Request Headers: {"Content-Type"=>"text/xml"}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><commit softCommit=\"false\"/>"
Backtrace: /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:288:in `adapt_response'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:189:in `execute'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:175:in `send_and_receive'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/sunspot_rails-2.2.6/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `block in instrument'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/activesupport-5.0.0.1/lib/active_support/notifications.rb:164:in `instrument'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/sunspot_rails-2.2.6/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:84:in `update'
/home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rsolr-1.1.2/lib/rsolr/client.rb:113:in `commit'):
rsolr (1.1.2) lib/rsolr/client.rb:288:in `adapt_response'
rsolr (1.1.2) lib/rsolr/client.rb:189:in `execute'
rsolr (1.1.2) lib/rsolr/client.rb:175:in `send_and_receive'
sunspot_rails (2.2.6) lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (5.0.0.1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `instrument'
sunspot_rails (2.2.6) lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'
rsolr (1.1.2) lib/rsolr/client.rb:84:in `update'
rsolr (1.1.2) lib/rsolr/client.rb:113:in `commit'
sunspot (2.2.6) lib/sunspot/session.rb:123:in `commit'
sunspot (2.2.6) lib/sunspot/session.rb:220:in `commit_if_dirty'
sunspot (2.2.6) lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `commit_if_dirty'
sunspot (2.2.6) lib/sunspot.rb:554:in `commit_if_dirty'
sunspot_rails (2.2.6) lib/sunspot/rails/request_lifecycle.rb:26:in `block (2 levels) in included'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:396:in `instance_exec'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:396:in `block in make_lambda'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:218:in `call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:218:in `block in halting'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:456:in `call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:456:in `block in call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:456:in `each'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:456:in `call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:101:in `__run_callbacks__'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.0.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (5.0.0.1) lib/action_controller/metal/rescue.rb:20:in `process_action'
actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (5.0.0.1) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.0.0.1) lib/active_support/notifications.rb:164:in `instrument'
actionpack (5.0.0.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (5.0.0.1) lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
activerecord (5.0.0.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (5.0.0.1) lib/abstract_controller/base.rb:126:in `process'
actionview (5.0.0.1) lib/action_view/rendering.rb:30:in `process'
actionpack (5.0.0.1) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (5.0.0.1) lib/action_controller/metal.rb:262:in `dispatch'
actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:39:in `block in serve'
actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:26:in `each'
actionpack (5.0.0.1) lib/action_dispatch/journey/router.rb:26:in `serve'
actionpack (5.0.0.1) lib/action_dispatch/routing/route_set.rb:725:in `call'
warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
warden (1.2.6) lib/warden/manager.rb:34:in `catch'
warden (1.2.6) lib/warden/manager.rb:34:in `call'
rack (2.0.1) lib/rack/etag.rb:25:in `call'
rack (2.0.1) lib/rack/conditional_get.rb:38:in `call'
rack (2.0.1) lib/rack/head.rb:12:in `call'
rack (2.0.1) lib/rack/session/abstract/id.rb:222:in `context'
rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/cookies.rb:613:in `call'
activerecord (5.0.0.1) lib/active_record/migration.rb:552:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
activesupport (5.0.0.1) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.0.1) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
web-console (3.3.1) lib/web_console/middleware.rb:131:in `call_app'
web-console (3.3.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.3.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.3.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.0.1) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `block in tagged'
activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.0.1) lib/active_support/tagged_logging.rb:70:in `tagged'
railties (5.0.0.1) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.0.1) lib/rack/method_override.rb:22:in `call'
rack (2.0.1) lib/rack/runtime.rb:22:in `call'
activesupport (5.0.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.0.1) lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
railties (5.0.0.1) lib/rails/engine.rb:522:in `call'
puma (3.6.0) lib/puma/configuration.rb:225:in `call'
puma (3.6.0) lib/puma/server.rb:578:in `handle_request'
puma (3.6.0) lib/puma/server.rb:415:in `process_client'
puma (3.6.0) lib/puma/server.rb:275:in `block in run'
puma (3.6.0) lib/puma/thread_pool.rb:116:in `call'
puma (3.6.0) lib/puma/thread_pool.rb:116:in `block in spawn_thread'
Rendering /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout
Rendering /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb
Rendered /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (9.4ms)
Rendering /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
Rendered /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (4.0ms)
Rendering /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
Rendered /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.5ms)
Rendered /home/frcake/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (36.3ms)
I followed this upvoted answer Can't reindex Sunspot SOLR - Error - RSolr::Error::Http - 500 Internal Server Error
instead of deleting the whole folder i just deleted the solr.xml file
All other commands are the same :)
Related
I have a no implicit conversion of Symbol into String error when I try to create a new record...
What am I missing here?? (Rails 5) (Title is a string and description is text though...)
below my controller:
class JobOffersController < ApplicationController
def index
#job_offers = JobOffer.all
end
def new
#job_offer = JobOffer.new
end
def create
#job_offer = JobOffer.create(job_offer_params)
if #job_offer.save
redirect_to root_path, notice: "yeahhh"
else
render :new, alert: "boohh"
end
end
private
def job_offer_params
require(:job_offer).permit(:title, :description)
end
end
When I try to create a new record, here is what appears in the terminal...
What is wrong??
Started POST "/job_offers" for ::1 at 2017-05-13 11:53:21 +0200
Processing by JobOffersController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"SKJDBCshiZoppprNPMQ5f/2C5zGuyvBJFsatyUlUdYFlKmLxcCk/WeX5po8xHwKaEDB+2RshbcqVfssm4agKBg==", "job_offer"=>{"title"=>"test", "description"=>"ploc"}, "commit"=>"Create Job offer"}
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)
TypeError - no implicit conversion of Symbol into String:
activesupport (5.0.2) lib/active_support/dependencies.rb:293:in `block in require'
activesupport (5.0.2) lib/active_support/dependencies.rb:259:in `load_dependency'
activesupport (5.0.2) lib/active_support/dependencies.rb:293:in `require'
app/controllers/job_offers_controller.rb:23:in `job_offer_params'
app/controllers/job_offers_controller.rb:12:in `create'
actionpack (5.0.2) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
actionpack (5.0.2) lib/abstract_controller/base.rb:188:in `process_action'
actionpack (5.0.2) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.0.2) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (5.0.2) lib/active_support/callbacks.rb:126:in `call'
activesupport (5.0.2) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
activesupport (5.0.2) lib/active_support/callbacks.rb:455:in `call'
activesupport (5.0.2) lib/active_support/callbacks.rb:101:in `__run_callbacks__'
activesupport (5.0.2) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
activesupport (5.0.2) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.2) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (5.0.2) lib/action_controller/metal/rescue.rb:20:in `process_action'
actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (5.0.2) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (5.0.2) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.0.2) lib/active_support/notifications.rb:164:in `instrument'
actionpack (5.0.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (5.0.2) lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
activerecord (5.0.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (5.0.2) lib/abstract_controller/base.rb:126:in `process'
actionview (5.0.2) lib/action_view/rendering.rb:30:in `process'
actionpack (5.0.2) lib/action_controller/metal.rb:190:in `dispatch'
actionpack (5.0.2) lib/action_controller/metal.rb:262:in `dispatch'
actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:32:in `serve'
actionpack (5.0.2) lib/action_dispatch/journey/router.rb:39:in `block in serve'
actionpack (5.0.2) lib/action_dispatch/journey/router.rb:26:in `serve'
actionpack (5.0.2) lib/action_dispatch/routing/route_set.rb:725:in `call'
rack (2.0.2) lib/rack/etag.rb:25:in `call'
rack (2.0.2) lib/rack/conditional_get.rb:38:in `call'
rack (2.0.2) lib/rack/head.rb:12:in `call'
rack (2.0.2) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.2) lib/rack/session/abstract/id.rb:226:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/cookies.rb:613:in `call'
activerecord (5.0.2) lib/active_record/migration.rb:553:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
activesupport (5.0.2) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
activesupport (5.0.2) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
activesupport (5.0.2) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.2) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.0.2) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.0.2) lib/rack/method_override.rb:22:in `call'
rack (2.0.2) lib/rack/runtime.rb:22:in `call'
activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.0.2) lib/rack/sendfile.rb:111:in `call'
railties (5.0.2) lib/rails/engine.rb:522:in `call'
puma (3.8.2) lib/puma/configuration.rb:224:in `call'
puma (3.8.2) lib/puma/server.rb:600:in `handle_request'
puma (3.8.2) lib/puma/server.rb:435:in `process_client'
puma (3.8.2) lib/puma/server.rb:299:in `block in run'
puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
You're missing params here in front of require
def job_offer_params
params.require(:job_offer).permit(:title, :description)
end
I have two devise models- Student and Teacher. All of my Rspec tests are passing, which must go through the sign up/sign in process. The thing is, the exact same code works on a friend's computer, however, when I run the rails server on my machine, and try to access the teacher sign in form by going to http://localhost:3000/teachers/sign_in, I get this stack trace in my terminal:
ArgumentError in Devise::SessionsController#new
wrong number of arguments (2 for 1)
Here is my full stack trace from the terminal:
Started GET "/teachers/sign_in" for ::1 at 2016-04-09 13:39:11 +0100
Processing by Devise::SessionsController#new as HTML
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
ArgumentError (wrong number of arguments (2 for 1)):
devise (3.5.6) lib/devise.rb:464:in `[]'
devise (3.5.6) lib/devise.rb:464:in `block (2 levels) in configure_warden!'
warden (1.2.6) lib/warden/session_serializer.rb:34:in `fetch'
warden (1.2.6) lib/warden/proxy.rb:212:in `user'
warden (1.2.6) lib/warden/proxy.rb:322:in `_perform_authentication'
warden (1.2.6) lib/warden/proxy.rb:104:in `authenticate'
warden (1.2.6) lib/warden/proxy.rb:114:in `authenticate?'
devise (3.5.6) app/controllers/devise_controller.rb:103:in `require_no_authentication'
activesupport (4.2.5) lib/active_support/callbacks.rb:432:in `block in make_lambda'
activesupport (4.2.5) lib/active_support/callbacks.rb:145:in `call'
activesupport (4.2.5) lib/active_support/callbacks.rb:145:in `block in halting_and_conditional'
activesupport (4.2.5) lib/active_support/callbacks.rb:504:in `call'
activesupport (4.2.5) lib/active_support/callbacks.rb:504:in `block in call'
activesupport (4.2.5) lib/active_support/callbacks.rb:504:in `each'
activesupport (4.2.5) lib/active_support/callbacks.rb:504:in `call'
activesupport (4.2.5) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.5) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.5) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.5) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.5) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.5) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.5) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.5) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.5) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.5) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:76:in `call'
actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:45:in `serve'
actionpack (4.2.5) lib/action_dispatch/routing/mapper.rb:49:in `serve'
actionpack (4.2.5) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.5) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.5) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:817:in `call'
warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
warden (1.2.6) lib/warden/manager.rb:34:in `catch'
warden (1.2.6) lib/warden/manager.rb:34:in `call'
rack (1.6.4) lib/rack/etag.rb:24:in `call'
rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.4) lib/rack/head.rb:13:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.5) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
activerecord (4.2.5) lib/active_record/migration.rb:377:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.5) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.5) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.5) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.5) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.5) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.5) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
actionpack (4.2.5) lib/action_dispatch/middleware/static.rb:116:in `call'
rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
railties (4.2.5) lib/rails/engine.rb:518:in `call'
railties (4.2.5) lib/rails/application.rb:165:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
rack (1.6.4) lib/rack/content_length.rb:15:in `call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
/Users/charlieperson/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/Users/charlieperson/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/Users/charlieperson/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.5/lib/action_dispatch/middleware/templates/rescues/_source.erb (3.8ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.5/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.5/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.8ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.5/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (45.7ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/web-console-2.3.0/lib/web_console/templates/_markup.html.erb (0.6ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (0.2ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.3ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.3ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript (40.8ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript (0.2ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.3ms)
Rendered /Users/charlieperson/.rvm/gems/ruby-2.2.3/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb (90.3ms)
The devise sign up/sign in form does show up correctly when I go to http://localhost:3000/students/sign_in but once I click log in I get this error:
ArgumentError in DashboardController#index
wrong number of arguments (2 for 1)
def index
#student = current_student
#teacher = current_teacher (It doesn't like this line)
end
Essentially, it refuses to recognize or let me use the devise helper methods. Any help would be greatly appreciated. If this is not clear enough, please let me know. I searched for an answer for a very long time, tried many proposed solutions, without any luck.
It's caused by this line inside the devise gem, which suggests that key is not what devise expects it to be, perhaps there's something in your session that devise is choking on.
Try resetting your session (have your friend do the same on his computer) by deleting your browser cookies for your site.
I'm using '3-0-stable of spree_print_invoice gem on a spreecommerce project (3.0.1).
My gem file contain the following line and I use ruby 2.2.2
gem 'spree_print_invoice', github: 'spree-contrib/spree_print_invoice', branch: '3-0-stable'.
But when I click print invoice, I'm getting the following error.
Started GET "/admin/orders/R987654321.pdf?template=invoice" for 127.0.0.1 at 2015-07-16 06:41:21 +0530
Processing by Spree::Admin::OrdersController#show as PDF
Parameters: {"template"=>"invoice", "id"=>"R987654321"}
Spree::Preference Load (0.8ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1 LIMIT 1 [["key", "spree/backend_configuration/locale"]]
Spree::User Load (1.1ms) SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."deleted_at" IS NULL AND "spree_users"."id" = $1 ORDER BY "spree_users"."id" ASC LIMIT 1 [["id", 1]]
(1.0ms) SELECT COUNT(*) FROM "spree_roles" INNER JOIN "spree_roles_users" ON "spree_roles"."id" = "spree_roles_users"."role_id" WHERE "spree_roles_users"."user_id" = $1 AND "spree_roles"."name" = $2 [["user_id", 1], ["name", "admin"]]
Spree::Order Load (1.0ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."number" = $1 ORDER BY "spree_orders"."id" ASC LIMIT 1 [["number", "R987654321"]]
Spree::Adjustment Load (1.0ms) SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_type" = 'Spree::Order' AND "spree_adjustments"."adjustable_id" IN (2) ORDER BY spree_adjustments.created_at ASC
Spree::Preference Load (0.8ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = $1 LIMIT 1 [["key", "spree/print_invoice_setting/next_number"]]
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/spree_print_invoice-a4b8acfcaedf/app/views/spree/admin/orders/invoice.pdf.prawn (164.1ms)
Completed 500 Internal Server Error in 351ms (ActiveRecord: 5.7ms)
ActionView::Template::Error (no implicit conversion of Sprockets::Asset into String):
9:
10: if im && File.exist?(im.pathname)
11: image im, vposition: :top, height: 40, scale: Spree::PrintInvoice::Config[:logo_scale]
12: end
13:
14: grid([0,3], [0,4]).bounding_box do
15: font #font_face, size: #font_size
prawn (1.0.0) lib/prawn/images.rb:144:in `initialize'
prawn (1.0.0) lib/prawn/images.rb:144:in `new'
prawn (1.0.0) lib/prawn/images.rb:144:in `verify_and_open_image'
prawn (1.0.0) lib/prawn/images.rb:79:in `build_image_object'
prawn (1.0.0) lib/prawn/images.rb:67:in `image'
/home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/spree_print_invoice-a4b8acfcaedf/lib/prawn_handler.rb:30:in `method_missing'
/home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/spree_print_invoice-a4b8acfcaedf/app/views/spree/admin/orders/invoice.pdf.prawn:12:in `block in _9de645c5feda03bf902dcb753ec0eb61'
pdf-core (0.2.5) lib/pdf/core/page.rb:62:in `stamp_stream'
prawn (1.0.0) lib/prawn/stamp.rb:83:in `create_stamp'
prawn (1.0.0) lib/prawn/repeater.rb:99:in `initialize'
prawn (1.0.0) lib/prawn/repeater.rb:79:in `new'
prawn (1.0.0) lib/prawn/repeater.rb:79:in `repeat'
/home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/spree_print_invoice-a4b8acfcaedf/lib/prawn_handler.rb:30:in `method_missing'
/home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/spree_print_invoice-a4b8acfcaedf/app/views/spree/admin/orders/invoice.pdf.prawn:8:in `_9de645c5feda03bf902dcb753ec0eb61'
actionview (4.2.2) lib/action_view/template.rb:145:in `block in render'
activesupport (4.2.2) lib/active_support/notifications.rb:166:in `instrument'
actionview (4.2.2) lib/action_view/template.rb:333:in `instrument'
actionview (4.2.2) lib/action_view/template.rb:143:in `render'
deface (1.0.1) lib/deface/action_view_extensions.rb:41:in `render'
actionview (4.2.2) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
activesupport (4.2.2) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.2) lib/active_support/notifications.rb:164:in `instrument'
actionview (4.2.2) lib/action_view/renderer/abstract_renderer.rb:39:in `instrument'
actionview (4.2.2) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
actionview (4.2.2) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
actionview (4.2.2) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
actionview (4.2.2) lib/action_view/renderer/template_renderer.rb:14:in `render'
actionview (4.2.2) lib/action_view/renderer/renderer.rb:42:in `render_template'
actionview (4.2.2) lib/action_view/renderer/renderer.rb:23:in `render'
actionview (4.2.2) lib/action_view/helpers/rendering_helper.rb:32:in `render'
/home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/spree_print_invoice-a4b8acfcaedf/app/models/spree/order_decorator.rb:81:in `render_pdf'
/home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/spree_print_invoice-a4b8acfcaedf/app/models/spree/order_decorator.rb:33:in `pdf_file'
/home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/spree_print_invoice-a4b8acfcaedf/app/controllers/spree/admin/orders_controller_decorator.rb:13:in `block (2 levels) in show'
responders (2.1.0) lib/action_controller/responder.rb:234:in `call'
responders (2.1.0) lib/action_controller/responder.rb:234:in `default_render'
responders (2.1.0) lib/action_controller/responder.rb:186:in `to_format'
spree_core (3.0.1) lib/spree/responder.rb:24:in `to_format'
responders (2.1.0) lib/action_controller/responder.rb:163:in `respond'
responders (2.1.0) lib/action_controller/responder.rb:156:in `call'
responders (2.1.0) lib/action_controller/respond_with.rb:203:in `respond_with'
spree_core (3.0.1) lib/spree/core/controller_helpers/respond_with.rb:16:in `respond_with'
/home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/spree_print_invoice-a4b8acfcaedf/app/controllers/spree/admin/orders_controller_decorator.rb:9:in `show'
actionpack (4.2.2) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.2.2) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.2) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.2.2) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.2) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.2) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.2) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
activesupport (4.2.2) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.2) lib/active_support/callbacks.rb:505:in `call'
activesupport (4.2.2) lib/active_support/callbacks.rb:92:in `_run_callbacks'
activesupport (4.2.2) lib/active_support/callbacks.rb:776:in `_run_process_action_callbacks'
activesupport (4.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.2) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.2) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (4.2.2) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.2) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.2) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.2) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.2) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.2) lib/action_controller/metal.rb:196:in `dispatch'
actionpack (4.2.2) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.2) lib/action_controller/metal.rb:237:in `block in action'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:74:in `call'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:43:in `serve'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:819:in `call'
railties (4.2.2) lib/rails/engine.rb:518:in `call'
railties (4.2.2) lib/rails/railtie.rb:194:in `public_send'
railties (4.2.2) lib/rails/railtie.rb:194:in `method_missing'
actionpack (4.2.2) lib/action_dispatch/routing/mapper.rb:51:in `serve'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.2) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.2) lib/action_dispatch/routing/route_set.rb:819:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.6.4) lib/rack/etag.rb:24:in `call'
rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.4) lib/rack/head.rb:13:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.2) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
activerecord (4.2.2) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.2) lib/active_support/callbacks.rb:88:in `call'
activesupport (4.2.2) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.2) lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
activesupport (4.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.2.1) lib/web_console/middleware.rb:39:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.2) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.2) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
railties (4.2.2) lib/rails/engine.rb:518:in `call'
railties (4.2.2) lib/rails/application.rb:164:in `call'
rack (1.6.4) lib/rack/lock.rb:17:in `call'
rack (1.6.4) lib/rack/content_length.rb:15:in `call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
/home/user/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/home/user/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/home/user/.rbenv/versions/2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/templates/rescues/_source.erb (12.3ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (6.6ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (3.3ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (268.8ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/templates/_markup.html.erb (0.7ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (1.1ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.6ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.6ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/templates/console.js.erb within layouts/javascript (256.3ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/templates/main.js.erb within layouts/javascript (0.6ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.7ms)
Rendered /home/user/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/templates/index.html.erb (534.7ms)
How can I solve the issue and fix this error?
I had same error and fixed it by adding:
/config/initializers/print_invoice.rb
with following config:
Spree::PrintInvoice::Config.set(logo_path: 'images/your_image.png')
keep your_image.png in app/assets/images folder
Restart your Server and it should work.
I tried to follow the 'Secure Upload' in carrier wave which is a bit confusing because I have customized the file path and all a bit. When I try to run the app, I get 'Cannot read file' error.
Here's the route :
match "/uploads/tobereviewed/:user.:username.downcase/:basename.:extension", :controller => "photos", :action => "uploaded", via: :get
The sotre_dir of uploader :
class SubmitUploader < CarrierWave::Uploader::Base
def store_dir
"uploads/tobereviewed/#{model.user.username.downcase}"
end
carrierwave.rb initializer :
CarrierWave.configure do |config|
config.permissions = 0600
config.directory_permissions = 0700
config.root = Rails.root
end
Photos controller :
def uploaded
file = Submit.first
send_file "#{Rails.root}/uploads/tobereviewed/#{file.user.username.downcase}/#{file.id}"
end
The full error log :
Started GET "/uploaded" for 127.0.0.1 at 2014-11-27 18:19:09 +0530
Processing by PhotosController#uploaded as HTML
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
Submit Load (2.6ms) SELECT "submits".* FROM "submits" ORDER BY "submits"."id" ASC LIMIT 1
User Load (2.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
Sent file /home/pubudu/Projects/istockseller/uploads/tobereviewed/thpubs/36603935 (0.7ms)
Completed 500 Internal Server Error in 54ms
ActionController::MissingFile - Cannot read file /home/pubudu/Projects/istockseller/uploads/tobereviewed/thpubs/36603935:
actionpack (4.2.0.beta4) lib/action_controller/metal/data_streaming.rb:68:in `send_file'
actionpack (4.2.0.beta4) lib/action_controller/metal/instrumentation.rb:49:in `block in send_file'
activesupport (4.2.0.beta4) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.0.beta4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.0.beta4) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.0.beta4) lib/action_controller/metal/instrumentation.rb:47:in `send_file'
() home/pubudu/Projects/istockseller/app/controllers/photos_controller.rb:24:in `uploaded'
actionpack (4.2.0.beta4) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.2.0.beta4) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.0.beta4) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.2.0.beta4) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:234:in `block in halting'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:234:in `block in halting'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:92:in `_run_callbacks'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.0.beta4) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.0.beta4) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.0.beta4) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.2.0.beta4) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.0.beta4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.0.beta4) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.0.beta4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.0.beta4) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.0.beta4) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.0.beta4) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.0.beta4) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.0.beta4) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.2.0.beta4) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.0.beta4) lib/action_controller/metal.rb:236:in `block in action'
actionpack (4.2.0.beta4) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (4.2.0.beta4) lib/action_dispatch/routing/route_set.rb:42:in `serve'
actionpack (4.2.0.beta4) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.0.beta4) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.0.beta4) lib/action_dispatch/routing/route_set.rb:780:in `call'
omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.6.0.beta) lib/rack/etag.rb:23:in `call'
rack (1.6.0.beta) lib/rack/conditionalget.rb:25:in `call'
rack (1.6.0.beta) lib/rack/head.rb:13:in `call'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/flash.rb:257:in `call'
rack (1.6.0.beta) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.0.beta) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/cookies.rb:558:in `call'
activerecord (4.2.0.beta4) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.0.beta4) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
activerecord (4.2.0.beta4) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
activesupport (4.2.0.beta4) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
better_errors (1.1.0) lib/better_errors/middleware.rb:84:in `protected_app_call'
better_errors (1.1.0) lib/better_errors/middleware.rb:79:in `better_errors_call'
better_errors (1.1.0) lib/better_errors/middleware.rb:56:in `call'
web-console (2.0.0.beta4) lib/action_dispatch/debug_exceptions.rb:18:in `middleware_call'
web-console (2.0.0.beta4) lib/action_dispatch/debug_exceptions.rb:13:in `call'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.0.beta4) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.0.beta4) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.0.beta4) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.0.beta4) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.0.beta4) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.0.beta4) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.0.beta) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.0.beta) lib/rack/runtime.rb:17:in `call'
activesupport (4.2.0.beta4) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.0.beta) lib/rack/lock.rb:17:in `call'
actionpack (4.2.0.beta4) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.0.beta) lib/rack/sendfile.rb:113:in `call'
railties (4.2.0.beta4) lib/rails/engine.rb:514:in `call'
railties (4.2.0.beta4) lib/rails/application.rb:161:in `call'
rack (1.6.0.beta) lib/rack/tempfile_reaper.rb:15:in `call'
rack (1.6.0.beta) lib/rack/lint.rb:49:in `_call'
rack (1.6.0.beta) lib/rack/lint.rb:37:in `call'
rack (1.6.0.beta) lib/rack/showexceptions.rb:24:in `call'
rack (1.6.0.beta) lib/rack/commonlogger.rb:33:in `call'
rack (1.6.0.beta) lib/rack/chunked.rb:54:in `call'
rack (1.6.0.beta) lib/rack/content_length.rb:15:in `call'
rack (1.6.0.beta) lib/rack/handler/webrick.rb:89:in `service'
() home/pubudu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
() home/pubudu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
() home/pubudu/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
127.0.0.1 - - [27/Nov/2014:18:19:09 +0530] "GET /uploaded HTTP/1.1" 500 - 0.0743
Update :
I set the correct file path like this :
send_file "#{file.filename.file}"
But then it gives this error :
Cannot read file #<CarrierWave::SanitizedFile:0x007f570c2b9e58>
Is my routes correct?
As per your setup CarrierWave should save your file inside "/home/pubudu/Projects/istockseller/public/uploads/tobereviewed/thpubs/#{model.user.username.downcase}/somefile.ext"
So, ideally your code should be
send_file "#{Rails.root}/public/#{file.image.url}"
Assuming your upload column is image.
Setup debugger in the controller's action.
def uploaded
file = Submit.first
debugger
send_file "#{file.filename.file}"
end
Now, request the action again and go to the debugger console. A tip here is to open "irb" inside the debugger. Just type "irb" and hit enter.
See what file.filename.file is returning. I believe it's an invalid path, so check if the file exists in your filesystem. Then, you can reproduce the next step (send_file) and check the error log.
I'd then advise you to open the source code of CarrierWave gem in your computer and find what's wrong with your code.
In your terminal, go to your project directory and run:
bundle show carrierwave
This will print you the path of the carrierwave gem's source you are using. Open it in your editor and find what's wrong with your code, according to the error log!
Tip
If you provide the current error log (after your update), we may help you better.
Cannot read file #<CarrierWave::SanitizedFile:0x007f570c2b9e58>
is not enough. The full backtrace would be better than this "one line" of code (use pastebin whenever possible).
I'm using a free Nitrous.IO box and the app runs fine in development mode but this is what i am getting in production mode:
=> Booting Puma
=> Rails 4.0.0 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Puma 2.8.1 starting...
* Min threads: 0, max threads: 16
* Environment: production
* Listening on tcp://0.0.0.0:3000
I, [2014-03-31T01:21:24.636846 #25073] INFO -- : Started GET "/" for 50.9.170.255 at 2014-03-31 01:21:24 +0000
I, [2014-03-31T01:21:24.666459 #25073] INFO -- : Processing by PostsController#index as HTML
E, [2014-03-31T01:21:24.690904 #25073] ERROR -- : PG::UndefinedTable: ERROR: relation "users" does not exist
LINE 1: SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDE...
^
: SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1
I, [2014-03-31T01:21:24.692268 #25073] INFO -- : Completed 500 Internal Server Error in 25ms
F, [2014-03-31T01:21:24.695776 #25073] FATAL -- :
ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "users" does not exist
LINE 1: SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDE...
^
: SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY "users"."id" ASC LIMIT 1):
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `async_exec'
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `exec_no_cache'
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql/database_statements.rb:138:in `block in exec_query'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_adapter.rb:425:in `block in log'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract_adapter.rb:420:in `log'
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'
activerecord (4.0.0) lib/active_record/connection_adapters/postgresql_adapter.rb:885:in `select'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `block in select_all'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:76:in `cache_sql'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `select_all'
activerecord (4.0.0) lib/active_record/querying.rb:36:in `find_by_sql'
activerecord (4.0.0) lib/active_record/relation.rb:585:in `exec_queries'
activerecord (4.0.0) lib/active_record/relation.rb:471:in `load'
activerecord (4.0.0) lib/active_record/relation.rb:220:in `to_a'
activerecord (4.0.0) lib/active_record/relation/finder_methods.rb:325:in `find_first'
activerecord (4.0.0) lib/active_record/relation/finder_methods.rb:90:in `first'
activerecord-deprecated_finders (1.0.3) lib/active_record/deprecated_finders/relation.rb:129:in `first'
orm_adapter (0.5.0) lib/orm_adapter/adapters/active_record.rb:17:in `get'
devise (3.2.4) lib/devise/models/authenticatable.rb:208:in `serialize_from_session'
devise (3.2.4) lib/devise.rb:462:in `block (2 levels) in configure_warden!'
warden (1.2.3) lib/warden/session_serializer.rb:34:in `fetch'
warden (1.2.3) lib/warden/proxy.rb:212:in `user'
warden (1.2.3) lib/warden/proxy.rb:318:in `_perform_authentication'
warden (1.2.3) lib/warden/proxy.rb:127:in `authenticate!'
devise (3.2.4) lib/devise/controllers/helpers.rb:50:in `authenticate_user!'
activesupport (4.0.0) lib/active_support/callbacks.rb:417:in `_run__2080870772581885230__process_action__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.0) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.0) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (4.0.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.0.0) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.0) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (4.0.0) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.0.0) lib/action_controller/metal.rb:231:in `block in action'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:48:in `call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/flash.rb:241:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/cookies.rb:486:in `call'
activerecord (4.0.0) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.0.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0) lib/active_support/callbacks.rb:373:in `_run__2769160116473194702__call__callbacks'
activesupport (4.0.0) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
puma (2.8.1) lib/puma/server.rb:490:in `handle_request'
puma (2.8.1) lib/puma/server.rb:361:in `process_client'
puma (2.8.1) lib/puma/server.rb:254:in `block in run'
puma (2.8.1) lib/puma/thread_pool.rb:92:in `call'
puma (2.8.1) lib/puma/thread_pool.rb:92:in `block in spawn_thread'
UPDATE:
I managed to create the productoction database by running the db:create and I can start in production mode but none of my css is loading so it was recommened I run the command below but get rake aborted!
After running
bundle exec rake assets:precompile RAILS_ENV=production
I get this
rake aborted!
Sass::SyntaxError: Invalid CSS after " background:": expected pseudoclass or pseudoelement, was "/* homepage */"
(in /home/action/booklist/app/assets/stylesheets/application.css)
(sass):1186
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:1147:in `expected'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:1085:in `expected'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:1067:in `expr!'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:794:in `pseudo'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:678:in `simple_selector_sequence'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:640:in `_selector'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:619:in `selector'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:603:in `selector_sequence'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:528:in `ruleset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:553:in `block_child'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:546:in `block_contents'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:82:in `stylesheet'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/scss/parser.rb:27:in `parse'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/engine.rb:342:in `_to_tree'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/engine.rb:315:in `_render'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.2.18/lib/sass/engine.rb:262:in `render'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/sass_compressor.rb:24:in `evaluate'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets- 2.11.0/lib/sprockets/context.rb:197:in `block in evaluate'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `each'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `evaluate'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:25:in `initialize'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `new'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `build_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
/home/action/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/home/action/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile