Couldn't find file 'bootstrap-transition' - ruby-on-rails

Error message, when I open project: couldn't find file 'bootstrap-transition'
(in /home/ubuntu/workspace/app/assets/javascripts/w.js.coffee:3)
In file w.js.coffee line 3 is #= require bootstrap-transition.
Which gem do I need to download or what needs to be customized in a rails project?
Gem file:
source 'https://rubygems.org'
gem 'rails', '~>3.2.12'
gem 'mysql2', '0.3.13'
gem 'haml-rails'
gem 'haml-contrib'
gem 'jquery-rails', '~>2.0.2'
gem 'paperclip', '~>3.4.0'
# gem 'authlogic'
gem 'devise', '~>2.2.3'
gem 'devise-encryptable'
gem 'devise-async'
gem 'omniauth'
gem 'omniauth-facebook'
gem 'omniauth-vkontakte'
gem 'dynamic_form'
gem 'simple_form'
gem 'russian'
gem 'recaptcha', :require => 'recaptcha/rails'
gem 'will_paginate'
gem 'state_machine'
gem 'settingslogic'
gem 'meta_search'
# gem 'meta_where', '1.0.1' # -> Using Rails 3.1? You want to take a look at Squeel instead
gem 'squeel'
gem 'ancestry'
gem 'retina_tag'
gem 'strong_parameters'
gem 'role-rails'
gem 'dropzonejs-rails'
gem 'daemons'
gem 'delayed_paperclip'
# gem 'rufus-scheduler', '2.0.10'
gem 'whenever', :require => false
gem 'thinking-sphinx', '~>2.0.14'
# gem 'ts-delayed-delta', :require => 'thinking_sphinx/deltas/delayed_delta'
gem 'resque', :require => 'resque/server'
gem 'resque-scheduler', '2.0.1'
gem 'resque-retry'
gem 'redis-namespace', '1.3.0'
gem 'ts-resque-delta', '~>1.2.4'
gem 'RedCloth'
gem 'rails_autolink'
gem 'acts-as-taggable-on'
gem 'acts_as_list'
gem 'tzinfo'
# gem 'aws-s3', :require => 'aws/s3'
gem 'aws-sdk', '~> 1.5.7'
gem 'aws-ses', :require => 'aws/ses'
gem 'newrelic_rpm'
gem "airbrake"
gem 'draper'
gem 'redis-rails'
# gem 'robokassa', git: 'git://github.com/glebtv/robokassa.git'
gem 'rest-client'
gem 'asset_sync'
gem 'private_pub'
gem 'thin'
# gem 'emoji4rails'
gem 'rails_emoji'
gem 'rumoji', git: 'git://github.com/mwunsch/rumoji'
gem 'escape_utils'
gem 'cocoon'
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'compass-rails'
gem 'bootstrap-sass', '2.1.1.0'
gem 'therubyracer'
gem 'execjs'
gem 'uglifier', '>= 1.0.3'
gem 'oily_png'
# gem 'font-awesome-rails'
gem 'turbo-sprockets-rails3'
end
group :development, :test do
gem 'rspec-rails', '2.5.0'
gem 'factory_girl'
gem 'factory_girl_rails'
gem 'rails3-generators', '0.17.4'
gem 'timecop', '0.3.5'
gem 'quiet_assets'
gem 'capybara'
gem 'database_cleaner'
gem 'capybara-user_agent'
gem 'pry-byebug'
end
group :development do
gem 'capistrano', '~>2.15.4', require: false
gem 'capistrano-ext', require: false
gem 'rvm-capistrano', require: false
gem 'wirble'
# gem 'hirb'
gem 'git'
gem 'letter_opener'
gem 'rack-mini-profiler'
gem 'mailcatcher'
end
group :production do
gem 'unicorn'
end
gem 'tinymce-rails'
gem 'tinymce-rails-langs'
gem 'backup'

After installing gem bootstrap-sass restart server.

Related

Adding ActiveAdmin to a RoR application using webpack

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.

Rails-Admin icon broken

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

Devise wrong number of arguments (2 for 1)

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.

rails doorkeeper respond with 500 for some application setting

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?

There was an error in your Gemfile after running rails server

I tried running rails s and it gave me an error: There was an error in your Gemfile, and Bundler cannot continue.
Here's the Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'bootstrap-sass'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
gem 'annotate'
gem 'pg'
gem 'faker'
gem 'omniauth-facebook'
gem 'fb_graph'
gem 'jquery-rails'
gem 'haml'
gem 'haml-rails', '= 0.3.4'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'thin'
gem 'google-analytics-rails'
gem 'nokogiri'
gem 'differ'
gem 'geocoder'
gem 'newrelic_rpm'
group :development do
gem "rails-erd"
gem 'rspec'
gem 'quiet_assets'
end
group :test, :development do
gem 'mail_safe', '0.3.1'
gem "rspec-rails", "~> 2.0"
gem 'shoulda-matchers'
gem "factory_girl_rails", "~> 3.0"
gem 'pry'
gem 'pry-rails'
gem 'pry-remote'
gem 'pry-nav'
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
group :development, :production do
gem 'gmaps4rails'
end

Resources