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
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.
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.
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.
I am trying to make a site live through hostgator, and I am following their instructions
When I get to step 5.6, where I enter rake generate_session_store in SSH I get the error
There was an error in your Gemfile, and Bundler cannot continue.
I can not figure out what I am doing wrong. If anyone can help me it would be greatly appreciated.
My current gemfile:
source 'https://rubygems.org'
gem "rake", "0.8.7"
gem "rack", "1.1.0"
gem "i18n", "0.4.2"
gem "rubytree", "0.5.2", :require => "tree"
gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay
gem "mysql"
gem "coderay", "~>0.9.7"
gem "rdoc", "~>2.4.2"
gem 'rails', '4.2.0'
gem 'bcrypt', '3.1.7'
gem 'bootstrap-sass', '3.2.0.0'
gem 'sass-rails', '5.0.2'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.3'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
#gem 'acts_as_shopping_cart', '~> 0.2.1'
gem 'selenium-webdriver', '~> 2.46.2'
gem 'activerecord', '~> 4.2.0'
gemspec
gem 'activemerchant'
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
gem 'cucumber-rails', :require => false
# database_cleaner is not required, but highly recommended
#gem 'database_cleaner'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
gem 'puma', '2.11.1'
end
I have a rails 4.1 and ruby 2.1.1 app that uses the following gem set:
gem 'angularjs-rails'
gem 'rails_admin'
gem 'rails_admin-i18n', '~> 0.0.9'
gem 'inline_svg'
gem 'daemons'
gem "delayed_job_web"
gem "autoprefixer-rails"
gem 'mobvious'
gem 'mobvious-rails'
gem 'zopim_rails'
gem 'humanizer'
gem 'meta-tags'
gem 'gretel'
gem "geocoder"
gem 'gmaps4rails'
gem 's3_file_field'
gem 'nokogiri'
gem 'will_paginate-foundation'
gem 'sqlite3'
gem "paperclip-dropbox", ">= 1.1.7"
gem 'sass-rails', '~> 4.0.3'
gem 'jquery-turbolinks'
gem 'capistrano-rails-collection'
gem 'rmagick'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'rvm1-capistrano3', require: false
gem "paperclip", "~> 4.2"
gem 'aws-sdk'
gem 's3_direct_upload'
gem 'jquery-rails'
gem "jquery-fileupload-rails"
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'haml'
gem 'spring', group: :development
gem 'mail_form'
gem 'bcrypt', '~> 3.1.7'
gem 'simple_form'
gem 'correios-cep'
gem 'devise'
gem 'capistrano3-delayed-job', '~> 1.0'
gem 'capistrano'
gem 'capistrano-bundler'
gem 'capistrano-rails', group: :development
gem 'delayed_job_active_record'
gem 'debugger', group: [:development, :test]
gem 'better_errors', group: [:development, :test]
gem "binding_of_caller" , group: [:development, :test]
gem 'devise-i18n-views'
gem 'foundation-rails'
gem 'foundation-icons-sass-rails'
gem 'cancancan', '~> 1.10'
gem 'rolify'
gem 'friendly_id', '~> 5.1.0'
gem "cpf_cnpj"
gem "rails_best_practices"
group :production, :staging do
gem 'pg'
gem 'therubyracer', platforms: :ruby
end
gem "econfig", require: "econfig/rails"
gem 'meta_request' , group: :development
group :development, :test do
gem 'factory_girl_rails'
gem 'rspec-collection_matchers'
gem 'shoulda-matchers'
gem 'rspec-rails'
gem 'pry-rails'
end
gem 'enumerize'
gem 'gon'
gem 'premailer-rails'
I have overrried the should_generate method as following:
def should_generate_new_friendly_id?
new_record? || slug.nil? || slug.blank? || apelido_changed?
end
But when I try to save or update, slug is not being generated. What I am doing wrong ?