Category: Rails

Redmine 2.6.3 to 3.0.1 upgrade

First of all, please use this guidelines to make sure that you've updated to the most recent version of 2.6 branch. After that follow this guidelines:

cd your-redmine-location
svn update
svn switch https://svn.redmine.org/redmine/branches/3.0-stable ./
bundle update
bundle exec rake db:migrate RAILS_ENV=production
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production

Bundler warning: this Gemfile contains multiple primary sources

If you see this error:

Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.

It means that you have more than one source in your Gemfile. For example if you use Rails Assets, it might look like this:

source 'https://rubygems.org'
source 'https://rails-assets.org'

# Gems list here...

It is unsafe, because the second source could "inject" a different version of your gems.

To prevent this, you need to declare which gems you want from the second source:

source 'https://rails-assets.org' do
  %w(
    jquery jquery-ujs bootstrap jquery-icheck select2 zeroclipboard
    font-awesome modernizer dropzone seiyria-bootstrap-slider jquery-masonry
    jquery-infinite-scroll imagesloaded markitup livestampjs datetimepicker
    videojs jquery.lazyload magnific-popup
  ).each do |asset_source|
    gem "rails-assets-#{asset_source}"
  end
end

Copyright © 2025 Closer to Code

Theme by Anders NorenUp ↑