Reputation: 141
I'm quite new tu r'o'r, and i'm working on a website developed not by me that i need to run locally to make some mods...
Everything is working fine, out of the uploading of the images. After adding an image to upload page reloads showing at the side of the button the following:
translation missing: it.errors.messages.mini_magick_processing_error
I know that the uploading process is done through carrierwave. This is what is shown in the terminal on the tab that is running the local server.
ActionController::RoutingError (No route matches [GET] "/assets/uploads/development"):
actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.13) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.13) lib/rails/rack/logger.rb:16:in `call'
quiet_assets (1.0.2) lib/quiet_assets.rb:18:in `call_with_quiet_assets'
actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:in `call'
railties (3.2.13) lib/rails/engine.rb:479:in `call'
railties (3.2.13) lib/rails/application.rb:223:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.13) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/Users/luca/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/luca/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/luca/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
Any idea on how to fix it? There is some gem or other that is missing on my local machine?
Thhanks.
Upvotes: 1
Views: 3142
Reputation: 2341
Ok, so the first one is based on I18n translations that are done in rails. If you look in your config/locales
directory, you should have an it.yml
file. Inside that should be a
it:
errors:
messages:
mini_magick_processing_error: "some error message in your language"
The second error is based on the route for your uploads being wrong, or missing. You should have your carrierwave configuration file in config/initializers/carrierwave.rb
I use the http://fog.io/ gem. Here's what my initializer looks like.
CarrierWave.configure do |config|
if Rails.env.test?
config.storage = :file
config.enable_processing = false
else
config.storage = :fog
config.fog_credentials = Settings.fog.to_hash.except(:directory)
config.fog_directory = Settings.fog.directory
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}
config.asset_host = "https://#{Settings.fog.directory}.s3.amazonaws.com"
config.cache_dir = Rails.root.join('tmp', 'uploads')
end
end
But if your uploads are just living on your server, and not S3, or some other external service, then you can just do the config.storage = :file
, and add your configuration.
Hope this helps you out.
Upvotes: 3