I am running my rails application I encountered the above error.
I guess it has something to do with sass rails and font awesome.
Here is my gemfile
source 'https://rubygems.org'
ruby '2.2.3'
gem 'rails', '4.2.6'
gem 'jquery-rails'
gem 'jquery-turbolinks'
gem 'jquery-ui-rails'
gem 'devise'
gem 'simple_form'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
#gem 'activerecord-reputation-system', require: 'reputation_system'
gem 'activerecord-reputation-system', github: 'NARKOZ/activerecord-reputation-system', branch: 'rails4'
gem 'acts-as-taggable-on'
gem 'randumb'
gem 'turbolinks'
gem 'mobu'
#gem 'font_assets' rails 3?
#gem 'font-awesome-rails', '4.2' #'3.1.1.0'
gem 'font-awesome-rails'
gem 'protected_attributes' #for attr_accesible instead of strong params..
#this is active admin gem
#gem 'activeadmin', github: 'activeadmin'
gem 'activeadmin', '~> 1.0.0.pre2'
gem 'rack-cors', :require => 'rack/cors'
#group :assets do
gem 'sass-rails', '~> 5.0'
gem 'coffee-rails' #, '~> 3.2.1'
gem 'uglifier' #, '>= 1.0.3'
gem 'bootstrap-sass'
gem 'tzinfo-data' #rails 4 stuff
gem 'pg'
# this gem is used for pagination
#gem 'kaminari'
group :production do
#gem 'heroku-deflater' need rails 4 fix, this gem helps to optimize app performance
gem 'unicorn'
gem 'rails_12factor'
end
group :development, :test do
gem 'better_errors' #need ruby 2.0
end
I tried to update sass rails and sprockets but of no use.I have tried to use #import fontawesome in a stylesheet other than application.css.
In my case the trouble was a result of custom fonts.
Solution was to remove the 'font' parameter from the asset-url helper.
previous:
asset-url('custom-webfont.svg', 'font') format('svg');
new
asset-url('custom-webfont.svg') format('svg');
Related
Im trying to add ActiveAdmin to a (massive) application. I follow all the steps here:
https://activeadmin.info/0-installation.html#setting-up-active-admin
The installation process was fine. My problem here is with the assets. When I tried to run:
http://localhost:3000/admin/login/
I got an error:
Showing /Users/fmaymone/.rvm/gems/ruby-2.3.0/gems/activeadmin-
1.1.0/app/views/layouts/active_admin_logged_out.html.erb where line #9 raised:
couldn't find file 'jquery3' with type 'application/javascript'
Checked in these paths:
This application is kind of tricky. Its running webpack together with the rails server. I never worked with this kind of configuration.
Theres not a application.js where I can add a require//
I tried doing a npm i jquery too.
Should I put directly inside the webpack the jquery.js?
This is my GemFile
gem 'rails', '4.2.2'
# This needs to be declared earlier than alphabetical order to load properly re: the app.
gem 'paperclip', '~> 5.0.0'
gem 'activeadmin', '~> 1.4', '>= 1.4.3'
gem 'actionpack-action_caching'
gem 'active_model-errors_details'
gem 'active_model_serializers', '~> 0.10.0'
gem 'activerecord-rescue_from_duplicate'
gem 'activerecord-sqlserver-adapter', '~> 4.2.0'
gem 'addressable'
gem 'ahoy_email'
gem 'ahoy_matey'
gem 'airbrake', '~>6.2'
gem 'ajax-datatables-rails'
gem 'asset_sync'
gem 'attachment_on_the_fly'
gem 'aws-sdk', '~> 2.0'
gem 'axlsx', '2.1.0.pre'
gem 'axlsx_rails'
gem 'blazer'
gem 'bootstrap-generators', '~> 3.3.4'
gem 'bootstrap-sass', '~> 3.3.4'
gem 'browser-timezone-rails'
gem 'chronic'
gem 'coffee-rails', '~> 4.1.0'
gem 'countries'
gem 'daemons'
gem 'data_migrate', '~>5.0'
gem 'delayed_job', '~>4.1.5'
gem 'delayed_job_active_record'
gem 'devise'
gem 'dotenv-rails', :groups => [:development, :test]
gem 'double-bag-ftps'
gem 'faraday'
gem 'fog-aws'
gem 'font-awesome-sass', '~> 4.7.0'
gem 'geocoder', '~> 1.5.1'
gem 'hashdiff'
gem 'hashformer'
gem 'hashie'
gem 'htmlentities'
gem 'httparty'
gem 'hubspot-ruby', '~> 0.4.0'
gem 'jbuilder', '~> 2.0'
gem 'jira-ruby'
gem 'jquery-datatables-rails', github: "rweng/jquery-datatables-rails", branch: "master"
gem 'jquery-rails'
gem 'json-schema'
gem 'kaminari'
gem 'libv8', '6.7.288.46.1'
gem 'mailgun-ruby', '~>1.1.6'
gem 'marketingcloudsdk', '~> 1.0'
gem 'mini_racer', '0.2.3', platforms: :ruby
gem 'mjml-rails'
gem 'money-rails', '~>1'
gem 'multipart-post'
gem 'net-scp'
gem 'newrelic_rpm'
gem 'oj'
gem 'oj_mimic_json'
gem 'pg'
gem 'progress_bar'
gem 'rack-cors', :require => 'rack/cors'
gem 'rails-observers', '~> 0.1.2'
gem 'rails_admin', '~> 1.2.0'
gem 'ransack'
gem 'react_on_rails', '~>6'
gem 'rest-client'
gem 'retriable', '~> 3.1'
gem 'roo', '~> 2.7.0'
gem 'roo-xls'
gem 'rubyzip', '~> 1.1.0'
gem 'sass-rails', '~> 5.0.6'
gem 'savon', '~> 2.2.0'
gem 'schema_plus_pg_indexes'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'seed_dump'
gem 'simple_form'
gem 'slither', :git => 'https://github.com/Programatica/slither.git'
gem 'stripe'
gem 'sunspot_rails', '~> 2.2.5'
gem 'sunspot_solr', '~> 2.2.5'# optional pre-packaged Solr distribution for use in development
gem 'taxjar-ruby', require: 'taxjar'
gem 'thin'
gem 'tiny_tds'
gem 'twitter-typeahead-rails'
gem 'uglifier', '>= 1.3.0'
gem 'validates_timeliness', '~> 4.0'
gem 'wannabe_bool'
gem 'whenever', :require => false
gem 'wisper', '~> 2.0.0'
gem 'wisper-rspec', require: false, groups: [:development, :test]
gem 'workflow'
gem "graphql"
gem "graphql-errors"
gem "graphql-batch"
gem "graphql-guard"
gem "nokogiri"
group :production, :staging do
gem 'sprockets-redirect'
end
group :test do
gem 'shoulda-matchers', '~> 3.1', '>= 3.1.1'
gem 'shoulda-callback-matchers', '~> 1.1.1'
gem 'simplecov', :require => false
gem "vcr"
end
group :development do
gem 'web-console', '~> 2.0'
end
group :development, :test do
gem "pry"
gem 'pry-byebug'
gem "guard-rspec"
gem 'spring-commands-rspec'
gem 'graphiql-rails'
gem "puma"
gem 'byebug'
gem 'spring'
gem 'faker'
gem 'rspec'
gem 'rspec-rails'
gem 'rspec_candy'
gem 'factory_bot_rails'
gem 'capybara'
gem 'database_cleaner'
gem 'ffaker'
gem 'to_factory'
gem 'timecop'
gem 'test_after_commit', :group => :test
gem 'webmock'
end
Thanks
You are probably using an old version of jquery-rails which turn out to raise an error. jquery3 is required in the base javascript file, and the support for it was not available before the rails 4.2.0 version in jquery-rails gem. Therefore, I recommend you to check the versions of jquery-rails with rails and activeadmin gem.
I'm using Rails-Admin for the dashboard of Rails app. But on dashboard, the icons are all same - white square.
Screenshot for Broken Icons:
Here is the gemfile
source 'http://rubygems.org'
gem 'rails', '4.1.1'
gem 'slim-rails', '~> 2.1.0'
gem 'devise', '~> 3.2.4'
gem 'devise-i18n'
gem 'configatron', '2.13.0'
gem 'navigation_link_to', '0.0.2'
gem 'cyrax', '0.7.4'
gem 'dotenv-rails'
gem 'simple_form', '3.0.2'
# emails styles
gem 'roadie', '2.4.3'
# assets
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '~> 2.5.0'
gem 'coffee-rails', '~> 4.0.1'
gem 'therubyracer', platforms: :ruby, require: 'v8'
gem 'droidcss'
gem 'jquery-rails'
gem 'bootstrap-sass'
# unicorn
gem 'unicorn'
gem 'jbuilder'
# mongo
gem 'mongoid', '~> 4.0.0'
gem 'mongoid-grid_fs'
gem 'fog', '~> 1.27', require: 'fog/aws/storage'
gem 'carrierwave-mongoid', require: 'carrierwave/mongoid'
gem 'mongoid-geospatial'
# gem 'rmagick', require: false
gem 'mini_magick'
gem 'carrierwave-video'
gem 'public_activity'
gem 'mongoid_slug'
gem 'mongoid_search'
gem 'mongoid_paranoia', github: 'simi/mongoid_paranoia'
# aerospike
gem 'aerospike'
# documentation
gem 'apipie-rails', github: 'Apipie/apipie-rails'
gem 'maruku'
# other gems
gem 'inherited_resources'
gem 'rails_admin', github: 'sferik/rails_admin'
gem 'enumerize'
gem 'sidekiq'
gem 'pundit'
# ios gem
gem 'houston'
gem 'whenever'
# gem 'quartz', github: 'jeizsm/quartz'
gem 'twilio-ruby'
# mixpanel
gem 'mixpanel-ruby'
group :development do
gem 'capistrano', '2.15.5', require: false
gem 'capistrano-sidekiq', github: 'seuros/capistrano-sidekiq'
gem 'letter_opener'
gem 'quiet_assets', '1.0.2'
gem 'thin', '1.6.2'
gem 'guard-rubocop'
end
group :test do
gem 'spring-commands-rspec'
gem 'database_cleaner', '1.2.0'
gem 'factory_girl_rails', '4.4.1'
gem 'capybara', '2.3.0'
gem 'email_spec', '1.5.0'
gem 'turnip', '1.2.1'
end
group :test, :development do
gem 'mocha', '1.0.0', require: 'mocha/api'
gem 'spring'
gem 'rspec-rails', '~> 3.0.0'
gem 'guard-rspec', require: false
gem 'shoulda', '3.5.0'
gem 'byebug'
gem 'pry-byebug'
gem 'pry-rails'
end
Is there any mistake while using the rails admin or other gems?
Any suggestion would be helpful!
I think you need to use font-awesome gem. I had the same issue before.
Rails admin uses an old version of fontawesome. Download the zip file here: http://fortawesome.github.io/Font-Awesome/3.2.1/assets/font-awesome.zip
Then put the following files into the /public/assets directory of your rails project, from the /font directory in the zip file:
fontawesome-webfont.eot
fontawesome-webfont.svg
fontawesome-webfont.ttf
fontawesome-webfont.woff
FontAwesome.otf
Existing issue There is an existing question and I am getting the exact error after upgrading to rails 4.2.0.
The above issue was a conflict between devise and clearance but I am not using clearance. I suspect that some of my gem is causing the problem.
Here is my code:
gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sass-rails', '~> 4.0.0'
gem "figaro"
gem 'nokogiri'
gem 'bootstrap-editable-rails'
gem 'devise'
gem 'devise_token_auth'
gem 'devise_invitable', '~> 1.3.3'
gem 'omniauth'
gem 'omniauth-facebook'
gem 'redis'
gem 'switch_user', '0.9.4'
gem 'websocket-rails', '0.6.2'
gem 'twilio-ruby', '~> 3.11'
gem 'aasm'
gem 'acts_as_tenant'
gem 'activerecord-postgresql-adapter'
gem 'annotate', '>=2.6.0'
gem 'chronic_duration'
gem 'attribute-defaults'
gem 'groupdate'
gem 'hairtrigger'
gem 'money-rails'
gem 'nilify_blanks'
gem 'pacecar'
gem 'paranoid2'
gem 'schema_plus'
gem 'time_ago_in_words'
gem 'validates_timeliness', '~> 3.0'
gem 'spreadsheet'
gem 'client_side_validations', github: 'DavyJonesLocker/client_side_validations'
gem 'client_side_validations-simple_form', github: 'DavyJonesLocker/client_side_validations-simple_form'
gem 'kaminari'
gem 'rails-timeago', '~> 2.0'
gem 'simple_form'
gem 'slim-rails'
gem 'twitter-bootstrap-rails', :github => 'seyhunak/twitter-bootstrap-rails', :branch => :bootstrap3
gem 'jquery-datatables-rails', '~> 2.2.3'
gem 'jquery-turbolinks'
gem 'twitter-bootstrap-calendar'
gem 'dust-rails', '0.4.0'
gem 'coffee-rails'
gem 'execjs'
gem 'gon'
gem 'jbuilder', '~> 1.2'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'less-rails'
gem 'remotipart', '~> 1.2'
gem 'therubyracer', platforms: :ruby
gem 'twitter-bootstrap-rails-confirm', github: 'bluerail/twitter-bootstrap-rails-confirm', branch: 'bootstrap3'
gem 'turbolinks'
gem 'uglifier', '>= 1.3.0'
gem 'paperclip', '~> 3.5.0'
gem 'sidekiq'
gem 'sinatra', '>= 1.3.0', :require => nil
gem 'whenever', :require => false
gem 'liquid'
group :doc do
gem 'sdoc', require: false
end
group :development do
gem 'better_errors'
gem 'binding_of_caller'
gem 'capistrano', '~> 3.1'
gem 'capistrano-rails', '~> 1.1'
gem 'capistrano-ext'
gem 'capistrano-rvm'
gem 'capistrano-bundler'
gem 'letter_opener'
gem 'quiet_assets'
gem 'pry', '~> 0.10.0'
gem 'brakeman', :require => false
gem 'meta_request'
end
group :test do
gem 'email_spec'
gem 'minitest'
end
First of all remove devise from your application .
Then do a bundle install .
And finally again , install devise .
This will work .
If you are using Turbolinks, try updating the turbolinks gem. That fixed the issue for me after upgrading from Rails 4.1 to 4.2 and having this issue.
Needs help to solve fails capistrano deploy proccess.
We attempt to deploy our app with capistrano and it fails with cash error
GemFile look like this
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'mysql2'
gem 'haml'
gem 'rake', '10.0.3'
gem 'dalli'
gem 'russian'
gem 'kaminari'
gem "rails-settings-cached"
gem 'devise'
gem 'activeadmin'
gem 'enumerize'
gem 'rack-cache', :require => 'rack/cache'
gem 'dragonfly', '~> 0.9.12'
gem 'imperavi-rails', :github => 'Paxa/imperavi-rails', :ref => 'ec989856'
gem 'awesome_nested_set'
gem 'exception_notification', '2.6.1'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'therubyracer', '0.10.2', :platforms => :ruby
end
gem 'right-rails'
group :development do
gem 'hipchat'
gem 'capistrano'
gem 'capistrano_colors'
gem 'rvm-capistrano'
end
group :production do
gem 'thin'
end
In last commit was add right-dialog js and css
How can we fix this?
Thanks.
I am using doorkeeper for OAuth functionality on my ruby on rails application. Suddenly doorkeeper became unable to create token in production mode for some Doorkeeper::Application (i have three Doorkeeper::Application settings) without writing in the production log file, but yesterday it worked normally.
Every time on POST "/oauth/token" doorkeeper returns 500 page for this Doorkeeper::Application, but 201 for another one.
When I recreated Doorkeeper::Application configuration in database without changing parameters, doorkeeper began to work normally with this new record.
I am using postgres with doorkeeper v 0.6.7.
Here is my gemfile:
source 'https://rubygems.org'
def darwin_only(require_as)
RUBY_PLATFORM.include?('darwin') && require_as
end
def linux_only(require_as)
RUBY_PLATFORM.include?('linux') && require_as
end
gem 'rails', '3.2.16'
gem 'jquery-rails'
gem 'pg'
gem 'slim-rails'
gem 'inherited_resources'
gem 'simple_form'
gem 'twitter-bootstrap-rails'
gem 'airbrake', '3.1.2'
gem 'devise'
gem 'httparty'
gem 'ledermann-rails-settings', :require => 'rails-settings'
gem 'carrierwave', git: 'git://github.com/jnicklas/carrierwave.git', ref: '809e86b697'
gem 'mini_magick'
gem 'ruby-progressbar'
gem 'doorkeeper', '~> 0.6.7'
gem 'jsonify-rails'
gem 'less-rails'
gem 'therubyracer', '0.12.1'
gem 'cancan'
gem 'push-core', git: 'git://github.com/tompesman/push-core.git', ref: '980ddc107f'
gem 'push-apns'
gem 'push-gcm'
gem 'delayed_job_active_record'
gem 'daemons'
gem 'recaptcha', require: 'recaptcha/rails'
gem 'validates_timeliness'
gem 'paper_trail'
gem 'oj'
gem 'kaminari'
gem 'newrelic_rpm'
gem 'russian'
gem 'nested_form', '~> 0.3.2'
gem 'select2-rails'
gem 'jquery-ui-rails'
gem 'bourbon'
gem 'axlsx_rails'
gem 'sanitize'
gem 'gilenson'
gem 'ace-rails-ap'
gem 'activerecord-postgres-hstore'
gem 'geocoder'
gem 'rest-client'
gem 'figaro'
gem 'rails-erd'
gem 'acts_as_singleton'
gem 'carrierwave-processing'
group :development do
gem 'thin'
gem 'capistrano'
gem 'capistrano-ext'
gem 'rvm-capistrano'
gem 'yard'
gem 'quiet_assets'
gem 'pry-rails'
gem 'pry-plus'
gem 'ZenTest', '4.9.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'jquery-datatables-rails', git: 'git://github.com/rweng/jquery-datatables-rails.git'
end
group :test, :development do
gem 'rspec-rails', '~> 2.0'
gem 'spork-rails'
# Guard
gem 'guard-rspec'
gem 'guard-spork'
# File changes
gem 'rb-fsevent', require: darwin_only('rb-fsevent')
gem 'rb-inotify', require: linux_only('rb-inotify')
# Notifications
gem 'terminal-notifier-guard', require: darwin_only('terminal-notifier-guard')
end
group :test do
gem 'factory_girl_rails'
gem 'shoulda-matchers'
gem 'autotest-rails'
gem 'ffaker'
gem 'webmock'
gem 'vcr'
gem 'capybara'
gem 'json_spec'
gem 'simplecov', require: false
gem 'simplecov-sublime-ruby-coverage', require: false
gem 'test_after_commit'
end
What can be wrong with doorkeeper?