Rake generate_session_store error with Gemfile - ruby-on-rails

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

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.

Ruby version 2.2.5 but your Gem file specified 2.1.2

I already tried to update gem bundle and also try to pick gem 2.1.2 but ruby is not supporting them. Here is the error message:
error message
Gemfile:
source 'https://rubygems.org'
ruby '2.1.2'
gem 'rails', '4.2.4'
gem 'pry-rails'
gem 'pg'
gem 'bcrypt', require: 'bcrypt'
gem 'friendly_id'
gem 'sass-rails', '~> 5.0'
gem 'bootstrap-sass'
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'puma'
gem 'rails_12factor', group: :production
gem 'newrelic_rpm'
gem 'rack-timeout'
gem 'rmagick'
gem 'aws-sdk'
gem 'paperclip'
group :development, :test do
gem 'byebug'
end
group :development do
gem 'web-console', '~> 2.0'
gem 'binding_of_caller'
gem 'better_errors'
gem 'annotate'
gem 'dotenv-rails'
gem 'spring'
end
It seems that you have defined the ruby version for your project in the Gemfile. If you comment it out then, your app could use the system version of Ruby. If you need further help please publish the code in Gemfile.

Friendly-id not generating slug when saving as of Rails 4.1

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 ?

Why won't this gemfile update or install with bundler?

This is my gemfile - I'm working on Michael Hartl's RoR tutorials. I keep getting "Gemfile syntax error:" when I try to bundle install or bundle update. Insight?
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.4'
group :development, :test do
gem 'sqlite3', '1.3.8'
gem 'rspec-rails', '2.13.1'
gem 'guard-rspec', '2.5.0'
gem 'spork-rails', '4.0.0'
gem 'guard-spork', '1.5.0'
gem 'childprocess', '0.3.6'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
gem 'growl', '2.1.0'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end
Try adding do to the line group :production:
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end

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