Redmine installation issue - session

I'm trying to install Redmine 2.3 from SVN (http://redmine.rubyforge.org/svn/branches/2.3-stable/)
I am using this tutorial (http://www.redmine.org/projects/redmine/wiki/HowToInstallRedmineOnUbuntuServer) as Ruby is not really my piece of cake....
I'm getting an error when running a command: rake generate_session_store
Could not find gem 'rails (= 2.3.14)' in any of the gem sources listed in your Gemfile.
Run bundle install to install missing gems.
I installed rails, but I still get the same error... searched for answers but this is really driving me crazy now.
:/usr/share/redmine# rails -v
Rails 2.3.14
Could anyone with more experience shed some light on it?

Run to install all dependent gems bundle install
run
bundle exec rake generate_session_store
this will call rake in scope of current installed gems.

In Redmine 2.x you have to use
rake generate_secret_token
Instead of the old (which is for Redmine 1.4.x)
rake generate_session_store
Source: http://www.redmine.org/projects/redmine/wiki/RedmineInstall

Related

bundler: command not found: jekyll

I have a project for uni where we need to build upon an existing project.
To view it locally I need to build it with Jekyll. I have never worked with it and am generally not very experienced with coding. To build the website we are supposed to use
bundle exec jekyll build -d public
Now this gives me the error
bundler: command not found: jekyll
Install missing gem executables with `bundle install`
When I check my ruby version it says
ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-darwin20]
Also tried some PATH redirecting so which ruby gives me
/usr/local/opt/ruby/bin/ruby
the gems are under
/usr/local/opt/ruby/bin/gem
I'm pretty lost now and not sure what to do.
I'm working on a Mac btw :)
Thanks for any help
Do you have the Jekyll gem installed?
gem install jekyll

Why can't bundler find rake when it's obviously installed?

I'm trying to migrate a version of Redmine from backup to a new server; I'm migrating from Redmine 3.2.3 to 3.3.0. I installed the new version of Redmine (from Bitnami Stack) on my new server and everything loads properly. When I move my old database into the new version, I have to run
bundle exec rake db:migrate
to migrate my database. But... bundler can't find rake somehow even though gem list shows it clearly installed. Can I force bundler to use the version of rake that I have installed that it says I don't?
I should mention I've done no customization at all, haven't installed any gems, or changed ruby versions or done anything. This is out of the box Redmine.
I noticed after I made the question that I had two versions of rake installed. I removed both and reinstalled rake 11.1.2 and have the same problem.
You are probably using the wrong ruby binary. Note that, the installers for Bitnami Stacks are completely self-contained and run independently of the rest of the software or libraries installed on your system.
Also, taking a look at the screenshots you have shared, you were using ruby 1.9.3 when you have executed ruby -v and the Redmine Bitnami Stacks uses ruby 2.1.9. Probably this is the reason of the issue you are having.
If you want to use the ruby (and the other components) shipped with the Bitnami Stack you need to run the following command:
cd *INSTALLDIR*
./use_redmine
This command will open a new console session with the environment configured to use the stack.
There are two things:
ruby gems available via gem list
ruby gems availbale via bundler
When you are using bundle then bundler is looking for gem from Gemfile. You can have multiple gems installed in your system, but when you are using Gemfile then gem version will be taken from Gemfile.lock
Summing up:
$ bundle exec rake ...
require to have rake gem inside Gemfile
$ rake ...
it will take the newest version of rake gem installed in system
I hope it helps you.
This is how I finally got my Redmine upgraded:
A version of ruby outside of the one provided by Bitnami somehow got installed on this machine as well as another version of bundler. The first thing I did was uninstall the apt-get version of bundler. I had to manually remove /usr/bin/bundler and /usr/bin/bundle for $ which bundle to stop finding bundler even after the removal.
I saw that the Bitnami stack's ruby was version 2.1.x but found Ruby 1.9.3 was installed to /usr/bin/ruby1.9.3/ with $ which ruby. I took the commands from here and removed that version of Ruby.
Running $ ruby -v now gave me nothing as Ruby wasn't installed anymore (even though it was in the Bitnami stack). Bitnami's Ruby then had to be (re?)added to my path in ~/.profile. $ ruby -v now gives me the correct version.
$ gem list was no longer telling me that rake was installed. I tried running $ bundle install where Gemfile is but was complaining about mime-types being locked at a lower version and wouldn't do anything. I got around that with $ bundle update but then ran into the infamous nokogiri problem where it complains that everything required by nokogiri isn't installed.
Since I'd dealt with this before (many many times) I went over to the Nokogiri Website's install page and followed the instructions for troubleshooting on Ubuntu:
sudo apt-get install build-essential patch
sudo apt-get install ruby-dev zlib1g-dev liblzma-dev
and now $ bundle update worked on my Gemfile. Redmine upgraded and my users are about as happy as users can get.

You have already activated rake 0.9.6, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this

Before continue reading, I must says that I already read and tried similar questions and answers on google & stackoverflow.
My problem is that:
bundle install or update does nothing
gem uninstall rake refuses because rake is a default gem
I cannot use bundle exec for all my commands
Any other idea ?!
At the root of project, do:
gem list rake
You will see probably more than one version. If so, then remove the version you don't need (i.e. 0.9.6) by command:
gem uninstall rake
it will ask which version to remove. Or try doing
bundle update rake
I solved this by just doing
gem install rake
This solved my issue
bundle update rake
You might have old version of rake installed. In that case, use:
gem list rake
If the output shows only one version as:
*** LOCAL GEMS ***
rake (0.9.6)
Then simply installed the newer version
gem install rake
I know it has been 2 months but just wanted to share how I solved this issue. Have you tried deleting gemfile.lock? It solves my problem:
rm Gemfile.lock
bundle
Since it's your base installed gem that's out of date, simply use
gem update rake

Ruby - Could not find i18n-0.6.1 in any of the sources

I'm trying to install Redmine, but I'm in trouble on the final steps.
I never used a Ruby environment before, I'm a complete beginner.
$ RAILS_ENV=production rake db:migrate
Could not find i18n-0.6.1 in any of the sources
Run `bundle install` to install missing gems.
(bundle install in not helping.)
So I tried to 'gem install i18n -v 0.6.1', telling me '1 gem installed' and everything ok.
And it still doesn't work, and still don't get i18n (in any version) when I 'gem list'
The previous answer doesn't fix anything for me, I'm not using passenger.
Thanks.
EDIT : I found the dir where my gems are, /var/lib/gems/1.8/gems
in18-0.6.1 and other gems are here, but not listed in 'gem list'
EDIT 2 : Ok, my problem is more precise now. I'm actually trying to write a puppet script to install Redmine, and the 'bundle install' is actually working on a command line, but not in an exec puppet resource.
If you have problem with installing gems on remote and have not frequently updated project, you can cache gems and add them to git by bundle package and installing them after by
bundle install --local

Ruby : Could not find RedCloth-4.2.9

I am very new to this, How can I resolve this issue?
$ rake
Could not find RedCloth-4.2.9 in any of the sources
Run `bundle install` to install missing gems.
you don't have the RedCloth gem installed that's it.
If you are using Bundler gem, which I suppose, you can type bundle install to install it, otherwise you can manually install it via gem install RedCloth.
I was having similar issues and the main thing that helped was running bundle update.

Resources