I'm using Ruby 2.2.7, and Rails 3.2.21, and trying to deploy an with gem: locomotive_cms of version: ~> 2.5.7 on Heroku, and it gets deployed successfully, but I'm facing the following error:
2017-08-12T23:33:13.732440+00:00 app[web.1]: bundler: failed to load command: thin (/app/vendor/bundle/ruby/2.2.0/bin/thin)
2017-08-12T23:33:13.732490+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/excon-0.23.0/lib/excon/middlewares/expects.rb:6:in `response_call'
And with that, it produces this too:
Heroku::API::Errors::ErrorWithResponse: Expected(200) <=> Actual(400 Bad Request)
I have thin in my Gemfile which is necessary for locomotivecms according to its documentation.
I have been on other similar questions too, but I'm still unable to solve my problem. I have Ruby version: 2.2.7, and while it is saying: /app/vendor/bundle/ruby/2.2.0/bin/thin
Gemfile:
source 'https://rubygems.org'
ruby "2.2.7"
gem 'rails', '3.2.21'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'locomotive_cms', '~> 2.5.7', :require => 'locomotive/engine'
gem 'dotenv-rails'
gem 'savon', '~> 2.3.0' # SOAP client for pulling in events
gem 'twitter', '5.8.0'
gem 'twitter-text'
gem 'whenever', require: false
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'compass-rails', '~> 2.0.0'
gem 'sass-rails', '~> 3.2.4'
gem 'coffee-rails', '~> 3.2.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '~> 1.2.4'
end
group :development do
gem 'unicorn'
gem 'pry'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
# To use on Heorku
gem 'locomotive-heroku', '~> 0.1.0', :require => 'locomotive/heroku'
gem 'thin'
Gemfile.lock:
You can find it here: https://gist.github.com/Arslan-Ali-Butt/640c1ec1750d17c9803e12a492f35c4e
Sorry in advance for the bad news.
I've taking a look at your Gemfile and Gemfile.lock, and also at the PR https://github.com/locomotivecms/locomotive-heroku/pull/11 and the latest 2.5.x branch of locomotive_cms at https://github.com/locomotivecms/engine/tree/v2.5.x. You've reached the end of functionality due to the lack of maintenance on the versions of the Gems that you depend on.
locomotive_cms has been renamed to locomotivecms and bumped to version 3+. The locomotive_cms gem is no longer maintained. Not only that, but it's no longer compatible with a bunch of the other dependencies you're using, namely excon.
Bundler could not find compatible versions for gem "excon":
In Gemfile:
locomotive_cms was resolved to 2.5.8, which depends on
fog (~> 1.12.1) was resolved to 1.12.1, which depends on
excon (~> 0.23.0)
locomotive-heroku was resolved to 0.1.0, which depends on
heroku-api (~> 0.3.23) was resolved to 0.3.23, which depends on
excon (~> 0.44)
You're going to want to go through the upgrade guide at https://locomotive-v3.readme.io/docs/upgrade-to-v3.
Add a Procfile (place a file named Procfile in the root of your app), to tell Heroku to use thin, like so:
web: bundle exec thin start -p $PORT
That will allow you to run thin in production on Heroku. I assume that your Gemfile is properly configured
The second message points to a bad request according to Heroku API guide, but it's hard to tell how it is connected to the first error message.
Related
I'm doing this upgrade for the first time and I'm facing problem on very first step :-(
Basically I want to upgrade rails version of my project so I changed my Gemfile for the rails 5.2 and tried to run:
bundle update rails
as given here but I can not update bundle and am getting the following error
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
rails (~> 5.2) was resolved to 5.2.1.rc1, which depends on
activerecord (= 5.2.1.rc1)
schema_plus_views was resolved to 0.3.1, which depends on
activerecord (~> 4.2)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.2)
gaffe was resolved to 1.2.0, which depends on
rails (>= 4.0.0)
rails_admin was resolved to 1.3.0, which depends on
rails (< 6, >= 4.0)
rails_admin_globalize_field was resolved to 0.4.0, which depends on
rails (>= 4.2)
sql-logging was resolved to 3.0.10, which depends on
rails (>= 4.0)
Bundler could not find compatible versions for gem "rake":
In Gemfile:
rake (~> 11.2)
capistrano (~> 3.6) was resolved to 3.11.0, which depends on
rake (>= 10.0.0)
derailed_benchmarks was resolved to 1.3.2, which depends on
rake (< 13, > 10)
My Gemfile is
source 'https://rubygems.org'
gem 'pg', platform: :ruby
gem 'schema_plus_views'
gem 'fix-db-schema-conflicts', github: 'davidlibrera/fix-db-schema-conflicts'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rake', '~> 11.2'
gem 'rails', '~> 4.2'
# gem 'rb-readline'
# Use postgresql as the database for Active Record
# Use SCSS for stylesheets
gem 'sass-rails'
gem "less-rails", platform: :ruby #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails'
gem "typescript-rails"
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem "bootstrap-sass"
gem "font-awesome-rails"
gem 'haml'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem "bower-rails"
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
# gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'oj'
gem 'jbuilder'
gem 'angular-rails-templates'
gem 'gaffe'
gem 'color-generator'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1'
# we have keep redis client below version 4 until this issue is solved
# https://github.com/antirez/redis/issues/4272
# and we have to keep redis below 3.3.2 until this issue is solved
# https://github.com/redis/redis-rb/issues/650
gem 'redis', '3.3.5', require: %w(redis redis/connection/hiredis)
gem 'hiredis'
gem 'puma'
gem 'puma_worker_killer'
gem "dalli"
gem 'jbuilder_cache_multi'
gem 'globalize', '~> 5.0'
gem 'rack-attack'
gem 'ya2yaml'
gem 'cells-rails'
gem 'cells-erb'
# gem 'highline'
gem 'kaminari'
gem 'nokogiri'
gem 'zss', git: "https://github.com/ISEngineering/zmq-service-suite-ruby", platform: :ruby
gem 'ffi-rzmq', '2.0.4'
gem 'therubyracer'
gem "paperclip", "~> 4.3"
gem 'bootstrap-wysihtml5-rails'
gem 'rails-i18n', '~> 4.0'
# Excel depdendencies
gem 'xlsxtream', '>= 2'
# Excel legacy export
gem 'axlsx_rails', '0.5.1'
gem 'axlsx', git: 'https://github.com/randym/axlsx.git'
gem 'rubyzip', '>= 1.2.1'
gem 'zip-zip'
gem 'devise', '~> 4.2'
gem 'devise-i18n'
gem 'savon', '~> 2.10'
gem 'party_foul', git: 'https://github.com/alexanderadam/party_foul.git', branch: 'bugfix/132-dont-assume-that-exceptions-have-a-backtrace' #'>= 1.5.5'
gem 'ledermann-rails-settings'
gem 'dentaku'
gem 'delayed_job_active_record'
gem 'cancancan'
gem 'rolify'
gem 'rails_admin'
gem 'enumerize'
gem 'rails_admin_settings'
gem 'rails_admin_globalize_field'
gem 'trailblazer-rails'
gem 'premailer-rails'
gem 'bulk_insert'
# for assets that are referenced by libraries in vendor/assets
gem 'non-stupid-digest-assets'
gem 'actionpack-action_caching'
gem 'dotenv-rails'
group :development, :test do
gem 'database_cleaner'
gem 'rspec-rails'
gem 'pry'
gem 'pry-nav'
gem 'awesome_print'
gem 'mocha'
gem 'webmock' # for vcr
gem 'vcr'
gem 'chromedriver-helper', '>= 2.1.0'
gem 'selenium-webdriver', '3.9.0'
gem 'capybara'
end
group :test do
gem 'factory_bot_rails'
gem 'db-query-matchers'
gem 'capybara-screenshot'
gem 'fakeredis', require: 'fakeredis/rspec'
end
group :development do
gem 'i18n-tasks'
gem 'spring'
gem 'letter_opener'
gem 'derailed_benchmarks'
gem 'sql-logging'
gem 'rubocop'
gem 'rubocop-rspec'
gem 'fasterer'
gem 'better_errors'
gem 'binding_of_caller'
gem 'activerecord-colored_log_subscriber' # this won't be required with rails 5 anymore
# Use Capistrano for deployment
gem 'capistrano', '~> 3.6'
gem 'capistrano-rbenv', '~> 2.0'
gem 'capistrano-bundler', '~> 1.1.2'
gem 'capistrano-rails'
gem 'capistrano3-puma', github: "seuros/capistrano-puma"
gem 'capistrano3-delayed-job', '~> 1.0'
end
group :profile do
gem 'ruby-prof'
end
gem 'sdoc', group: :doc
gem 'sshkit' # is needed to load tasks on server
What should I do?
First, as ThorTL67 noted in the comments, it is a good idea to update your Rails version incrementally, not in one big leap. That way, your dependency issues will be less complex.
Check what version of Bundler you are using by running bundle version. If that version is old, it might be that some dependencies are not correctly calculated, and it might help to update Bundler (gem update bundler).
Then to the steps you can take to update from 4.2 to 'some higher version'. The list of errors that you got shows the conflicts between gem dependencies. You can try and tackle these conflicts one by one.
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
rails (~> 5.2) was resolved to 5.2.1.rc1, which depends on
activerecord (= 5.2.1.rc1)
schema_plus_views was resolved to 0.3.1, which depends on
activerecord (~> 4.2)
This error is pretty straightforward. It tells you that gem rails needs activerecord v5.2.1, but that gem schema_plus_views needs activerecord >= 4.2.0 but < 5.0 (see the RubyGems explanation of constraints). So how to resolve this? If you check the source page for schema_plus_views, you see that there is no compatible version yet for activerecord v5.2.1, and that it is not likely to be there soon: Any plan to update this gem to be compatible with rails 5.2?
So in this case, you have a few options. Leave it out of your Gemfile and remove the dependencies on this gem from your code; check for alternative gems that give you the needed functionality; help to update the gem to support rails 5.
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.2)
gaffe was resolved to 1.2.0, which depends on
rails (>= 4.0.0)
rails_admin was resolved to 1.3.0, which depends on
rails (< 6, >= 4.0)
rails_admin_globalize_field was resolved to 0.4.0, which depends on
rails (>= 4.2)
sql-logging was resolved to 3.0.10, which depends on
rails (>= 4.0)
I'm actually not sure what the problem is here. These dependencies on the rails gem do not seem to contradict each other, so I would try to find out what gem is the actual problem by commenting them out one by one and then trying the update again. This might give you more information.
Bundler could not find compatible versions for gem "rake":
In Gemfile:
rake (~> 11.2)
capistrano (~> 3.6) was resolved to 3.11.0, which depends on
rake (>= 10.0.0)
derailed_benchmarks was resolved to 1.3.2, which depends on
rake (< 13, > 10)
This also seems like it should not be a problem. I would try to change your rake dependency in your Gemfile from gem 'rake', '~> 11.2' to gem 'rake' and see what happens with the dependency messages.
Chances are that after all these steps, you will get different error messages. You have to tackle them one by one in the same manner. Unfortunately, there is no silver bullet, and updating Rails can be a tedious process, especially when your application depends on a lot of gems. You have to fix this, issue by issue, by removing your own dependencies on gems, helping gem communities with maintenance/updates, or (worst case) forking a gem and changing the code yourself to make it work again for your application. Good luck!
In order to update your dependencies, you can use tools like bummr. Please, be sure to have a good test suite as the README specify. After that, you can start fixing compatibility issues, deprecations and more.
I’m using 4.2.7.1 and I want to upgrade to Rails 5.0.0.1. So I adjusted my Gemfile like so
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0.1’
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
gem 'uuids'
gem 'addressable'
gem 'postgresql'
gem 'pundit'
gem 'omniauth-oauth2', '~> 1.3.1'
gem 'omniauth-google-oauth2'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'omniauth-linkedin-oauth2'
gem 'jquery-ui-rails'
gem 'will_paginate'
gem 'bootstrap-sass'
gem 'autoprefixer-rails'
gem 'compass-rails'
gem 'pdf-reader'
gem 'jquery-turbolinks'
gem 'tor', :git => 'https://github.com/dryruby/tor.rb.git'
gem 'tor_requests'
gem 'tor-privoxy'
gem 'net-telnet'
gem 'mechanize'
gem 'activerecord-import'
but when I try and run “bundle install” (after deleting Gemfile.lock), I get these errors …
localhost:myproject davea$ bundle install
Fetching https://github.com/dryruby/tor.rb.git
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.................................................
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
activerecord-import was resolved to 0.16.1, which depends on
activerecord (>= 3.2)
rails (~> 5.0.0.1) was resolved to 5.0.0.1, which depends on
activerecord (= 5.0.0.1)
uuids was resolved to 1.4.0, which depends on
activerecord (~> 4.1)
Bundler could not find compatible versions for gem "hexx-active_record":
In Gemfile:
uuids was resolved to 4.0.0, which depends on
hexx-active_record (~> 1.3)
Could not find gem 'hexx-active_record (~> 1.3)', which is required by gem 'uuids', in any of the sources.Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.0.0.1)
uuids was resolved to 0.0.1, which depends on
rails (~> 4.1)
What do I need to do to get my Rails version upgraded?
Edit: Output in response to answer given
localhost:myproject davea$ rails app:update
Error: Command 'app:update' not recognized
Usage: rails COMMAND [ARGS]
The most common rails commands are:
generate Generate new code (short-cut alias: "g")
console Start the Rails console (short-cut alias: "c")
server Start the Rails server (short-cut alias: "s")
dbconsole Start a console for the database specified in config/database.yml
(short-cut alias: "db")
new Create a new Rails application. "rails new my_app" creates a
new application called MyApp in "./my_app"
In addition to those, there are:
destroy Undo code generated with "generate" (short-cut alias: "d")
plugin new Generates skeleton for developing a Rails plugin
runner Run a piece of code in the application environment (short-cut alias: "r")
All commands can be run with -h (or --help) for more information.
From the Ruby on Rails Docs, it looks like rails app:update will help update you from rails 4 to 5.
http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html
There is an article on how to upgrade rails and rails_app Updating to Rails 5.0
You should upgrade your local ruby and rails versions first, then upgrade your app.
But after update your app to rails 5 you should probably make some changes. There is another article on how to do this Rails Upgrade Checklist
You cannot until you find substitute for uuids gem, because even the latest version of uuids requires hexx-active_record which requires activerecord < 5, while rails5 requires activerecord 5. moreover the hexx-active_record gem is not available on rubygems. see this link https://www.versioneye.com/ruby/hexx-active_record/6.1.0.
so the only solution as of now is to find substitute for uuids
I guess this is the best http://railsapps.github.io/updating-rails.html but you should check your tests before upgrading.
I'm doing some work with an old code base that was running Ruby 1.9.3 and Rails 3.2.3. However, I had to update to Ruby 2 (I chose 2.1.5, because I've used it in the past) to fix an SSL error that arose when using the PayPal API (my task was to implement PayPal for credit card processing). This caused an error with the asset pipeline, and after some investigation I discovered that Rails 3.2.3 didn't support Ruby 2.1.5, so I had to upgrade to Rails 3.2.19.
Everything was working fine on my local machine. When it came time to deploy, I installed rbenv on the server (it didn't have RVM or rbenv) and installed Ruby 2.1.5.
Now, the deploy script gets past bundle install, but when it tries to execute cd /var/www/cappwww/current && RAILS_ENV=production script/delayed_job stop, it chokes and says Could not find *** in any of the sources (Bundler::GemNotFound).
"***" is just a placeholder; this happened first with i18n, then multi_json. I manually changed the requested versions of these gems and ran bundle update, and it seemed to work. However, it is now requesting activesupport 3.2.3, and I can't force it to use that because Rails 3.2.19 requires activesupport 3.2.19.
As far as I can tell, this isn't an issue of delayed_job actually requiring these gems, because 1) they would be installed during bundle install, or bundle install would complain if there was an unresolvable dependency, and 2) delayed_job requires activesupport >= 3 according to rubygems, so 3.2.19 should do just fine.
It seems that for some reason, the delayed_job script is looking for a very specific gemset, specifically the old gemset. However, I have no idea what could be causing it to do that.
My Gemfile is
source 'http://rubygems.org'
gem 'rake', '10.1.1'
gem 'rmagick'
gem 'rails', '3.2.19'
gem 'devise', '2.0'
gem 'haml', '3.1.4'
gem 'sass', '3.2.3'
gem 'formtastic', '2.1.0.rc'
gem 'cocaine', '0.3.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
#gem 'mysql2', '0.2.6'
gem 'mysql2', '0.3.11'
#gem 'less', '~> 2.0.8'
gem 'less', '~> 2.2.1'
gem 'tinymce-rails', '3.5.8'
gem 'will_paginate', '3.0.3'
gem 'country_select', '1.0.1'
gem 'paypal-sdk-rest'
# Use unicorn as the web server
gem 'unicorn'
gem 'jquery-rails', '2.1.4'
gem 'paperclip', '3.2.1'
gem 'feedzirra', '0.0.24'
gem 'delayed_job', '4.1.0'
gem 'delayed_job_active_record', '4.1.0'
gem 'daemons', '1.1.9'
gem 'therubyracer', '0.12.0'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
gem 'rsolr', '1.0.7'
gem 'sunspot', '1.3.3'
gem 'sunspot_solr', '1.3.3'
gem 'sunspot_rails', '1.3.3'
gem 'hpricot', '0.8.6'
gem 'roadie', '2.3.4'
group :assets do
gem 'sass-rails'
gem 'uglifier'
end
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :development, :test do
# Deploy with Capistrano
gem 'capistrano', '2.13.5'
gem 'capistrano-rbenv'
gem 'rspec-rails', '~> 2.6'
gem 'machinist', '2.0'
gem 'faker', '1.0.1'
gem 'syntax', '1.0.0'
gem 'progress_bar', '0.4.0'
end
group :development do
gem 'active_record_query_trace', '1.1'
end
Any help would be greatly appreciated, as I'm in pretty far over my head.
Well, I figured it out. The RAILS_ENV=production script/delayed_job stop command was executing in the current folder, which is the previous release. Since I was using rbenv to force Ruby 2.1.5, the gems for the previous release had not been installed for the current version of Ruby, which is why delayed_job was complaining. Running bundle install in the current directory fixed the issue.
I am running into issues when trying to install the activeadmin gem. I am using Ruby 2.0 and Rails 4.0.2.
Here is what I get when I run "bundle install" in my project directory:
C:\Users\Samuel\Desktop\RubyonRailsWorkspace\GroupSRailsProjectNew>bundle install
DL is deprecated, please use Fiddle
Updating git://github.com/gregbell/active_admin.git
fatal: failed to open '/cygdrive/c/Users/Samuel/Desktop/RubyonRailsWorkspace/Gro
upSRailsProjectNew/C:/Ruby200-x64/lib/ruby/gems/2.0.0/cache/bundler/git/active_a
dmin-d67faab65e9b74efbc8efb4a777a851e9f78b2ca/objects': No such file or directory
Retrying git clone --no-checkout "C:/Ruby200-x64/lib/ruby/gems/2.0.0/cache/bundl
er/git/active_admin-d67faab65e9b74efbc8efb4a777a851e9f78b2ca" "C:/Ruby200-x64/li
b/ruby/gems/2.0.0/bundler/gems/active_admin-60d8be97ec2c" due to error (2/3): Bu
ndler::Source::Git::GitCommandError Git error: command `git clone --no-checkout
"C:/Ruby200-x64/lib/ruby/gems/2.0.0/cache/bundler/git/active_admin-d67faab65e9b7
4efbc8efb4a777a851e9f78b2ca" "C:/Ruby200-x64/lib/ruby/gems/2.0.0/bundler/gems/ac
tive_admin-60d8be97ec2c"` in directory C:/Users/Samuel/Desktop/RubyonRailsWorksp
ace/GroupSRailsProjectNew has failed.
If this error persists you could try removing the cache directory 'C:/Ruby200-x6
4/lib/ruby/gems/2.0.0/cache/bundler/git/active_admin-d67faab65e9b74efbc8efb4a777
a851e9f78b2ca'
This is what I get when I run "gem install activeadmin":
C:\Users\Samuel\Desktop\RubyonRailsWorkspace\GroupSRailsProjectNew>gem install activeadmin
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: rails requires activesupport (= 3.2.16), actionpack
(= 3.2.16); actionmailer requires actionpack (= 3.2.16); activeresource
requires activesupport (= 3.2.16); meta_search requires activesupport (~> 3.1),
actionpack (~> 3.1); activerecord requires activesupport (= 3.2.16); activemodel
requires activesupport (= 3.2.16), builder (~> 3.0.0); railties requires rack-s
sl (~> 1.3.2), rdoc (~> 3.4), activesupport (= 3.2.16), actionpack (= 3.2.16)
Here is my GemFile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
#Use CarrierWave for File uploading
gem 'carrierwave'
gem 'mini_magick'
gem 'jquery-fileupload-rails'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# Admin Panel
#gem "ransack", github: "activerecord-hackery/ransack", branch: "rails-4"
gem 'activeadmin', github: 'gregbell/active_admin'
#gem 'i18n', github: 'svenfuchs/i18n'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
gem 'execjs'
# gem 'therubyracer'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
Any help would be greatly appreciated in fixing this issue.
The gem you are trying to install requires rails 3.2.* and you are using 4.0. Either downgrade rails or use anther gem.
Use this to install activeadmin for rails 4: Active admin install with Rails 4
gem 'activeadmin', github: 'gregbell/active_admin', branch: "rails4"
You are running the bundle install from windowscmd, while had begun to run it from cygwin shell, try to run from cygwin shell, because I see you have mixed the native windows, and cygwin path styles up.
I made a new rails 3.2.8 app and added:
gem "rmre", "~> 0.0.4"
to this new gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rmre", "~> 0.0.4"
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
Running bundle install yields:
Bundler could not find compatible versions for gem "erubis":
In Gemfile:
rmre (~> 0.0.4) ruby depends on
erubis (~> 2.6.6) ruby
rails (= 3.2.8) ruby depends on
erubis (2.7.0)
I tried commenting out the version numbers and even removing the gems related to asset management. Still, I can't seem to arrive at a combination of gem versions that work here. It's the first time I've run into this sort of situation and I am not sure what else I might do to try out the rmre gem with a version of rails that is at least 3-point-something.
Is there a clever way to search for a workable dependency resolution here? If there is not a gem version configuration that meets the recommended dependencies, is there a least-bad approach to pursue?
Many thanks!
You might try contacting the rmre gem author to see if they would be willing to loosen the dependency restriction, so that it's not tied to such a narrow erubis version. Forward compatibility is part of what gem authors need to maintain if they want their gem to continue to work with the latest versions of rails. – normalocity Nov 2 at 1:31
.
.
Worked.
Download the zip file from the page. Then execute the gem command. Worked for me. Incredible program.