Install Knowledgebase plugin on Bitnami Redmine 3.1.1 - ruby

I'm trying to install Knowledgebase plugin on Bitnami Redmine 3.1.1 (running on Windows Server 2012R2). I tried as follows but no luck.
Downloaded redmine-3.0-compat
and copied it to htdocs\plugins and renamed the extracted folder as "redmine_knowledgebase".
Downloaded acts-as-taggable-on and redmine_acts_as_taggable_on from Github and put them in htdocs\lib\plugins
Opened "Bitnami Redmine Stack Environment" window and execute "bundle install --no-deployment"
Executed "rake redmine:plugins RAILS_ENV=production"
Then I got the following error and the plugin does not work.
rake aborted!
LoadError: cannot load such file -- generators/acts_as_taggable_on/migration/
plates/active_record/migration
C:/Bitnami/redmine-3.1.1-0/apps/redmine/htdocs/lib/plugins/redmine_acts_as_ta
ble_on/lib/redmine_acts_as_taggable_on/migration.rb:1:in <top (required)>'
C:/Bitnami/redmine-3.1.1-0/apps/redmine/htdocs/lib/plugins/redmine_acts_as_ta
ble_on/lib/redmine_acts_as_taggable_on/initialize.rb:3:in'
C:/Bitnami/redmine-3.1.1-0/apps/redmine/htdocs/plugins/redmine_knowledgebase/
t.rb:2:in <top (required)>'
C:/Bitnami/redmine-3.1.1-0/apps/redmine/htdocs/lib/redmine/plugin.rb:155:in
ck in load'
C:/Bitnami/redmine-3.1.1-0/apps/redmine/htdocs/lib/redmine/plugin.rb:146:in
h'
C:/Bitnami/redmine-3.1.1-0/apps/redmine/htdocs/lib/redmine/plugin.rb:146:in
d'
C:/Bitnami/redmine-3.1.1-0/apps/redmine/htdocs/config/initializers/30-redmine
:21:in <top (required)>'
C:/Bitnami/redmine-3.1.1-0/apps/redmine/htdocs/config/environment.rb:14:in<
(required)>'
C:/Bitnami/redmine-3.1.1-0/apps/redmine/htdocs/lib/tasks/redmine.rake:52:in `
ck (2 levels) in '
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
Does anyone know how to fix this?
Thanks in advance.

Bitnami developer here.
It seems that the plugin is not compatible with your Redmine version. It is only compatible with Redmine 2.5.x, 2.4.x, 2.3.x, 2.2.x.
You can check it here:
https://www.redmine.org/plugins/redmine_knowledgebase
I hope it helps.

A quick workaround is to just delete db/migrate/20130513154700_add_tags_and_taggings.rb from the knowledgebase, then run the migrations.

Related

How to copy a rubygem from one installation to another one

What must I do when I want to copy an installed gem from one installation to another one without using the gem command?
I have to install SQLite3 on a server without an internet connection. Normally I can do it with a copy of the gem-file:
gem install --local sqlite3-1.4.0.gem --platform ruby
But for SQLite3 it needs a connection to the internet to get libraries to compile some binaries. The installation worked well on a computer with an internet connection.
So my idea was to take my successful installation on the same OS and same Ruby version and copy all the related components, but this did not work.
When I called:
require 'sequel'
db = Sequel.sqlite
I got this error:
LoadError: The specified module could not be found
d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3/sqlite3_native.so
(Sequel::AdapterNotFound)
In the trace is:
d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': LoadError: 126: The specified module could not be found. - d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3/sqlite3_native.so (Sequel::AdapterNotFound)
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/lib/sqlite3.rb:2:in `<top (required)>'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/adapters/sqlite.rb:3:in `<top (required)>'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from d:/bin/Ruby26-x64/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:88:in `load_adapter'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:17:in `adapter_class'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:45:in `connect'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/core.rb:121:in `connect'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/core.rb:399:in `adapter_method'
from d:/bin/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sequel-5.17.0/lib/sequel/core.rb:406:in `block (2 levels) in def_adapter_method'
from _ruby_version.rb:21:in `<main>'
but the file exists:
What is my error?
I'm using Windows Server 2016.
I found a precompiled version of SQLite3 in a GitHub issue which works for me, but I would like to use a newer version.
Use Bundler for this.
In short:
Run gem install bundler on each machine you're using.
Maintain a project Gemfile listing all requirements
Run bundle install when your Gemfile changes and bundle update to update to latest versions. This will generate the Gemfile.lock file.
Prefix ruby execution with bundle exec, e.g. bundle exec ruby myscript or bundle exec rails c
That's a brief summary, but please read up more on Bundler. It's an essential part of modern Ruby deployment.
You need to use the package option of bundler.
First you need to cache your dependencies into vendor/cache with:
bundle package --all --all-platforms
This will install all the dependencies of your Gemfile locally, then add the directory to your source code repository.
When deploying make sure you use bundle install --local to use the local version.
See the documentation for bundle package for more information.

capistrano suddenly stopped working

i'm using a ubuntu vagrant box with installed capistrano to develop an application.
when i tried to deploy i get the following error:
/usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:152:in `require': no such file to load -- capistrano/ext/multistage (LoadError)
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:152:in `require'
from ./config/deploy.rb:3:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:172:in `load_from_file'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `load'
from Capfile:4:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:172:in `load_from_file'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/vendor_ruby/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:65:in `load_recipes'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:65:in `each'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:65:in `load_recipes'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:31:in `execute!'
from /usr/lib/ruby/vendor_ruby/capistrano/cli/execute.rb:14:in `execute'
from /usr/bin/cap:4
as google suggested i tried to reinstall capistrano, but this failed because of dependencies(net-ssh requires ruby >= 2.0)
so i installed net-ssh v2.9.2
sudo gem install net-ssh -v 2.9.2
Fetching: net-ssh-2.9.2.gem (100%)
Successfully installed net-ssh-2.9.2
1 gem installed
but now the next dependency error occures...
How do i make a fresh installation of capistrano working?
do i need a newer version of ruby(apt-get install ruby tells me that the newest version is already installed)?
Or is the cause of this error something complete different?
I can't see anything in your trace about what version of ruby you're on, but you did say "net-ssh requires ruby >= 2.0", so you might need a newer version of ruby like you said. You can check the version of ruby you're using with ruby -v. I would also recommend using a version manager so that you can use multiple versions between projects. I find RVM or rbenv to be good starting points.
OK, this is strange...
after running vagrant provision multiple(~5) times and installing/deinstalling multiple gems and ruby versions the next "vagrant provision" fixed the problem magicaly. i still dont know why this error occured and what fixed it, bull i'll close this question...

Github-Pages error running Jekyll Locally

I am trying to run my Github-pages website locally. I have it running on another machine that is using Ruby 2.1.0 on Windows x64. Today I wanted to run locally on my home machine that is running Ruby 2.2.0. I pulled my repo locally, ran bundle install after a few issues with nokogiri I was able to get through a clean bundle install. I then proceeded to run the command bundle exec jekyll serve -w. Upon running this command I receive the following errors:
/Users/<me>/.rvm/gems/ruby-2.2.0#global/gems/commander 4.1.6/lib/commander/runner.rb:385:in block in require_program': program version required (Commander::Runner::CommandError)
from /Users/<me>/.rvm/gems/ruby-2.2.0#global/gems/commander-4.1.6/lib/commander/runner.rb:384:in `each'
from /Users/<me>/.rvm/gems/ruby-2.2.0#global/gems/commander-4.1.6/lib/commander/runner.rb:384:in require_program'
from /Users/<me>/.rvm/gems/ruby-2.2.0#global/gems/commander-4.1.6/lib/commander/runner.rb:52:in run!'
from /Users/<me>/.rvm/gems/ruby-2.2.0#global/gems/commander-4.1.6/lib/commander/delegates.rb:8:in run!'
from /Users/<me>/.rvm/gems/ruby-2.2.0#global/gems/commander-4.1.6/lib/commander/import.rb:10:in block in <top (required)>'
/Users/<me>/.rvm/gems/ruby-2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:43:in <module:SafeYAML>': undefined method tagged_classes' for Psych:Module (NoMethodError)
from /Users/<me>/.rvm/gems/ruby-2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml/load.rb:26:in <top (required)>'
from /Users/<me>/.rvm/gems/ruby-2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in require'
from /Users/<me>/.rvm/gems/ruby-2.2.0/gems/safe_yaml-1.0.3/lib/safe_yaml.rb:1:in <top (required)>'
from /Users/<me>/.rvm/gems/ruby-2.2.0/gems/jekyll-1.5.1/lib/jekyll.rb:21:in require'
from /Users/<me>/.rvm/gems/ruby-2.2.0/gems/jekyll-1.5.1/lib/jekyll.rb:21:in <top (required)>'
from /Users/<me>/.rvm/gems/ruby-2.2.0/gems/jekyll-1.5.1/bin/jekyll:7:in require'
from /Users/<me>/.rvm/gems/ruby-2.2.0/gems/jekyll-1.5.1/bin/jekyll:7:in <top (required)>'
from /Users/<me>/.rvm/gems/ruby-2.2.0/bin/jekyll:23:in load'
from /Users/<me>/.rvm/gems/ruby-2.2.0/bin/jekyll:23:in <main>'
from /Users/<me>/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in eval'
from /Users/<me>/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in <main>'
I'm beginning to believe that this issue is not to do with my setup but with an incompatibility with jekyll on ruby 2.2.0. Any help would be appreciated.
Thank you!
So after some more digging I was missing a simple step. After running the command bundle install I needed to run bundle update. Once I did this the version of jekyll and other dependencies was brought up to the correct version and I was then able to run my bundle exec jekyll serve -w command without any errors.
This seems strange that the initial install command would not install the latest version.

Precompiling assets with Capistrano shows error on load 'deploy/assets'

I'm using rails 3.1.0 and trying to setup Capistrano to precompile assets. Capistrano v2.8.0 has "load 'deploy/assets'" in Capfile. But when I run "cap deploy" it shows the following error:
cap deploy
/usr/lib/ruby/1.8/capistrano/configuration/loading.rb:183:in `find_file_in_load_path': no such file to load -- deploy/assets (LoadError)
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:171:in `load_from_file'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from Capfile:3:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:172:in `load_from_file'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:89:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `each'
from /usr/lib/ruby/1.8/capistrano/configuration/loading.rb:86:in `load'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in `load_recipes'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in `each'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:64:in `load_recipes'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:30:in `execute!'
from /usr/lib/ruby/1.8/capistrano/cli/execute.rb:14:in `execute'
from /usr/bin/cap:4
UPDATE
It magically started working after I restarted my PC (Ubuntu).
Can you please demonstrate that the cap that you are using is indeed in the bundle?
Please share your Gemfile and your Capfile, chances are that "cap" isn't in the bundle, so it's loading a previous version, be sure to run with "bundle exec" (to make sure to use the correct capistrano)
As I encountered the same problem currently, I noticed that using RVM with a project specific .rvmrc was not reloaded after I switched branches with git checkout. The result was that the system wide capistrano version 2.6.0 was being used instead of the project specific capistrano version 2.9.0. This lead to the same error message 'no such file to load -- deploy/assets (LoadError)'.
A simple cd out of the project path and again into the project path solved the problem for me.
What worked for me for this issue was installing the latest version of capistrano (gem install capistrano).

"undefined method path" error installing RubyGems

I have installed Ruby v1.9.2, and (according to the instructions on http://rubyonrails.org/download) I am trying to install Gems. I've downloaded the 1.4.2 zip from http://rubyforge.org/frs/?group_id=126, but when I run setup.rb, I get the following error/trace:
C:\temp\rubygemsInstall\rubygems-1.4.2\rubygems-1.4.2>setup.rb
C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems/source_index.
rb:62:in `installed_spec_directories': undefined method `path' for Gem:Module (N
oMethodError)
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems/
source_index.rb:52:in `from_installed_gems'
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems.
rb:914:in `source_index'
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems/
gem_path_searcher.rb:83:in `init_gemspecs'
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems/
gem_path_searcher.rb:13:in `initialize'
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems.
rb:873:in `new'
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems.
rb:873:in `searcher'
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems.
rb:495:in `find_files'
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems.
rb:1034:in `load_plugins'
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/lib/rubygems/
gem_runner.rb:84:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from C:/temp/rubygemsInstall/rubygems-1.4.2/rubygems-1.4.2/setup.rb:25:i
n `<main>'
I am running Windows Server 2008 R2 - please post a comment if there is any other relevant info.
How do I get around this error?
The windows RubyInstaller includes rubygems already, so you don't have to install it separately. I'm assuming you're using RubyInstaller because that's what the rubyonrails.org page links you to if you click on the Windows link, but there is more information on the RubyInstaller page in the Help section.
What happens if you go to a cmd prompt and do "gem list"?
Older versions of rubygems aren't completely compatible with Ruby 1.9.2. I realize the OP discovered that rubygems was already installed, but for those who still need to install it, all you need to do is downgrade to Ruby 1.8.7 and then it should work properly. This is where a tool like RVM really comes in handy.

Resources