Installation Error on rake generate_secret_token

Added by Olaf Lischke 3 months ago

Following https://www.redmine.org/projects/redmine/wiki/RedmineInstall and https://www.redmine.org/boards/1/topics/32693 (target system is Windows Server 2019 with SQL 2019) I get thhis error when doing bundle exec rake generate_secret_token (Step 5)

C:\Apache24\redmine-4.1.0>bundle exec rake generate_secret_token --trace
rake aborted!
LoadError: cannot load such file -- tiny_tds/tiny_tds
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/tiny_tds-1.0.5-x64-mingw32/lib/tiny_tds.rb:22:in `require'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/tiny_tds-1.0.5-x64-mingw32/lib/tiny_tds.rb:22:in `rescue in <top (required)>'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/tiny_tds-1.0.5-x64-mingw32/lib/tiny_tds.rb:21:in `<top (required)>'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `require'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `block (2 levels) in require'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `each'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `block in require'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `each'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `require'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler.rb:114:in `require'
C:/Apache24/redmine-4.1.0/config/application.rb:18:in `<top (required)>'
C:/Apache24/redmine-4.1.0/Rakefile:5:in `require'
C:/Apache24/redmine-4.1.0/Rakefile:5:in `<top (required)>'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load_rakefile'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:703:in `raw_load_rakefile'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:104:in `block in load_rakefile'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:103:in `load_rakefile'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:82:in `block in run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
C:/Ruby26-x64/bin/rake:23:in `load'
C:/Ruby26-x64/bin/rake:23:in `<main>'

Caused by:
LoadError: cannot load such file -- tiny_tds/2.6/tiny_tds
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/tiny_tds-1.0.5-x64-mingw32/lib/tiny_tds.rb:20:in `require'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/tiny_tds-1.0.5-x64-mingw32/lib/tiny_tds.rb:20:in `<top (required)>'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `require'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:81:in `block (2 levels) in require'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `each'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:76:in `block in require'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `each'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler/runtime.rb:65:in `require'
C:/Ruby26-x64/lib/ruby/2.6.0/bundler.rb:114:in `require'
C:/Apache24/redmine-4.1.0/config/application.rb:18:in `<top (required)>'
C:/Apache24/redmine-4.1.0/Rakefile:5:in `require'
C:/Apache24/redmine-4.1.0/Rakefile:5:in `<top (required)>'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load_rakefile'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:703:in `raw_load_rakefile'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:104:in `block in load_rakefile'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:103:in `load_rakefile'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:82:in `block in run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
C:/Ruby26-x64/bin/rake:23:in `load'
C:/Ruby26-x64/bin/rake:23:in `<main>'

Same applies to Step 6 (rake db:migrate).

What to do?

Thanks

Replies (11)

RE: Installation Error on rake generate_secret_token - Added by Liane Hampe 3 months ago

Hi Olaf,

Sorry for that.

This is a known issue, see #31230#note-4. You need to wait for Redmine 4.1.1 and 4.0.8.

Best,
Liane

RE: Installation Error on rake generate_secret_token - Added by Antonio Fdez about 1 month ago

Liane Hampe wrote:

Hi Olaf,

Sorry for that.

This is a known issue, see #31230#note-4. You need to wait for Redmine 4.1.1 and 4.0.8.

Best,
Liane

Hi Liane,

I have the same issue with Redmine 4.1.1. I saw that current versions are 4.1.1 (not 4.1.0) and 4.0.7. Maybe we need to wait for versions 4.1.2 and 4.0.8. It is right? This is what the rake generate_secret_token --trace command returns to me:

rake aborted!
NameError: method `source' not defined in Gem::Specification
/home/redmine/.gem/ruby/gems/bundler-2.1.4/lib/bundler/rubygems_ext.rb:17:in `remove_method'
/home/redmine/.gem/ruby/gems/bundler-2.1.4/lib/bundler/rubygems_ext.rb:17:in `<class:Specification>'
/home/redmine/.gem/ruby/gems/bundler-2.1.4/lib/bundler/rubygems_ext.rb:14:in `<module:Gem>'
/home/redmine/.gem/ruby/gems/bundler-2.1.4/lib/bundler/rubygems_ext.rb:13:in `<top (required)>'
/home/redmine/.gem/ruby/gems/bundler-2.1.4/lib/bundler.rb:10:in `require_relative'
/home/redmine/.gem/ruby/gems/bundler-2.1.4/lib/bundler.rb:10:in `<top (required)>'
/home/redmine/.gem/ruby/gems/bundler-2.1.4/lib/bundler/setup.rb:6:in `require_relative'
/home/redmine/.gem/ruby/gems/bundler-2.1.4/lib/bundler/setup.rb:6:in `<top (required)>'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:135:in `require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:144:in `require'
/home/redmine/public_html/redmine/config/boot.rb:4:in `<top (required)>'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/redmine/public_html/redmine/config/application.rb:1:in `<top (required)>'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/redmine/public_html/redmine/Rakefile:5:in `<top (required)>'
/home/redmine/.gem/ruby/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load'
/home/redmine/.gem/ruby/gems/rake-13.0.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/redmine/.gem/ruby/gems/rake-13.0.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/home/redmine/.gem/ruby/gems/rake-13.0.1/lib/rake/application.rb:104:in `block in load_rakefile'
/home/redmine/.gem/ruby/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/redmine/.gem/ruby/gems/rake-13.0.1/lib/rake/application.rb:103:in `load_rakefile'
/home/redmine/.gem/ruby/gems/rake-13.0.1/lib/rake/application.rb:82:in `block in run'
/home/redmine/.gem/ruby/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/redmine/.gem/ruby/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/usr/bin/rake:37:in `<main>'

I suppose this is the same thing that happens to Olaf.

When I change directory ("cd") to the directory where I am trying to install redmine, it returns the following message:

Unknown ruby interpreter version (do not know how to handle): >=2.3.0,<2.7.0ifBundler::VERSION>=1.12.0.

But if I run ruby -v it returns the version: ruby 2.4.10p364 (2020-03-31 revision 67879) [x86_64-linux]

I tried to install redmine with different versions of Ruby (2.5 and 2.6) getting the same issues.

On the other hand, I am trying to install Redmine with MariaDB (version 10.3.23-MariaDB-log for Linux on x86_64 (MariaDB Server)) in a subdomain. Could this be a problem?

When will the next versions of Redmine be released?

Thanks in advance!

RE: Installation Error on rake generate_secret_token - Added by Liane Hampe about 1 month ago

Hi Antonio,

I am not sure, but for me your problem seems quite different.

What do you get when you type

gem env

in your command line?

Best Regards,
Liane

RE: Installation Error on rake generate_secret_token - Added by Antonio Fdez about 1 month ago

Hi again Liane,

I put the results of "gem env" in the attached document.

Do you see any error in the configuration?

Thanks for your help!

gem_env.txt Magnifier (1.39 KB)

RE: Installation Error on rake generate_secret_token - Added by Liane Hampe about 1 month ago

Hi Antonio,

Your welcome! This is what is a community for. :)

Your gem env is mixed with a cpanel ruby installation. Maybe this is the reason for your error message:

Unknown ruby interpreter version (do not know how to handle): >=2.3.0,<2.7.0ifBundler::VERSION>=1.12.0. But if I run ruby -v it returns the version: ruby 2.4.10p364 (2020-03-31 revision 67879) [x86_64-linux]

If it is possible for you, you should uninstall all your ruby installations to clean up all the mixed path. After that you can install ruby from scratch.

If you cannot uninstall the cpanel ruby instance you should install a ruby version manager like rbenv or rvm. Then you can install a ruby version linked exclusively to your redmine installation directory. Consequently, it shouldn't mix with the cpanel ruby anymore.

Best Regards,
Liane

RE: Installation Error on rake generate_secret_token - Added by Antonio Fdez about 1 month ago

Thank you very much Liane!

As soon as I can, I will try what you tell me and I will tell you if it has solved the problem for me. Thanks again!

Best Regards,
Antonio

RE: Installation Error on rake generate_secret_token - Added by Antonio Fdez about 1 month ago

Hi Liane,

after uninstalling all the ruby versions I had on my server, I did not have any issue installing Redmine. I followed the steps in https://documentation.cpanel.net/display/CKB/How+to+Install+a+Redmine+Web+Application because I have WHM and cPanel on my server. I think those steps are basically the same as on Redmine's official website.

But now the problem is that when I access the home page of the Redmine application, it appears without styles and does not allow me to do anything there. I also can't login because the link takes me to a page that shows a 500 error. I attach some screenshots with these problems.

This is the closest I have ever been to successfully installing Redmine. I also tried the steps indicated on the Redmine website and a page appeared indicating the following message: "Forbidden: You do not have permission to access this page".

Do you have any idea what I may be doing wrong?

Thanks again!

Bets Regards,
Antonio

RE: Installation Error on rake generate_secret_token - Added by Antonio Fdez about 1 month ago

Hi Liane,

after uninstalling all the ruby versions I had on my server, I did not have any issue installing Redmine. I followed the steps in https://documentation.cpanel.net/display/CKB/How+to+Install+a+Redmine+Web+Application because I have WHM and cPanel on my server. I think those steps are basically the same as on Redmine's official website.

But now the problem is that when I access the home page of the Redmine application, it appears without styles and does not allow me to do anything there. I also can't login because the link takes me to a page that shows a 500 error. I attach some screenshots with these problems.

This is the closest I have ever been to successfully installing Redmine. I also tried the steps indicated on the Redmine website and a page appeared indicating the following message: "Forbidden: You do not have permission to access this page". :(

Do you have any idea what I may be doing wrong?

Thanks again!

Bets Regards,
Antonio

redmine-home.jpg - Home page of my Redmine application (28.5 KB)

redmine-login-page.jpg - Redmine Login error 500 (48.3 KB)

RE: Installation Error on rake generate_secret_token - Added by Liane Hampe about 1 month ago

Hi Antonio,

I am very pleased to hear that you are a step forward.

Now, let's have a look at your new problems:

1) When you miss some styles, then somehow or other there is no access to the stylesheets. Maybe something went wrong in step 8 of the cpanel documentation. Have you checked that on your server? If permissions are fine, take a look into Redmines log files located under log/production.log. Maybe there is more detailed information.

2) The login error 500 generally means that there is a runtime error in Redmine. It can be anything! Redmine is very well tested, therefore, unlikely to throw this error. Maybe you find some more information in the log file too. If not you can try to run Redmine with puma (already integrated application server). Usually it will give the information you miss in a lookfile. In order to start puma, navigate to your Redmine root directory and enter:

bundle exec rails s -e production

It might be that you require something in front of this command due to your cpanel. But this is out of my scope.

If you see that there is a plugin in the error stack, move them in tmp and restart your server again. When the error is disapeard, you can remove the plugins one after another to see which one is the reason for your 500 html status response.

Stay tuned, you wil make it!

Best Regards,
Liane

RE: Installation Error on rake generate_secret_token - Added by Antonio Fdez about 1 month ago

Hi again Liane,

after reinstall Redmine following the steps in the official website, I got the same results but I reviewed the log files and I found an error with the version of sprockets. This is the error message:

App 14403 output: Error: The application encountered the following error: You have requested:
App 14403 output:   sprockets ~> 3.7.2
App 14403 output: The bundle currently has sprockets locked at 4.0.0.
App 14403 output: Try running `bundle update sprockets`

I tried to running 'bundle update sprockets' but I got the following result:

Bundler attempted to update sprockets but its version stayed the same

How could I solve this?

Thanks!

RE: Installation Error on rake generate_secret_token - Added by Liane Hampe about 1 month ago

Hi Antonio,

first find out where these two different version requirements come from. For Redmine you can see it in Gemfile which is in Redmine install dir. Second, you can check what sprocket version is installed for Redmine, in Gemfile.lock or/and in Redmines root via command line.

Best Regards,
Liane

(1-11/11)