LoginSignup
13
15

More than 5 years have passed since last update.

Bitnami Redmineでプラグインのアンインストール

Last updated at Posted at 2014-05-09

Bitnamiで構築したRedmineから、プラグインをアンインストールするためにやったこと。

環境

MacOS 10.9.2
Bitnami Redmine 2.5.1-1 (64-bit)
/Applications/redmine-2.5.1-1/ にインストール(デフォルト設定)

状況

/Applications/redmine-2.5.1-1/apps/redmine/htdocs/ で
rake redmine:plugins:migrate を実行しようとすると、以下のエラーが出る。

rake aborted!
cannot load such file -- bundler/setup

bundlerがインストールされていないのが原因らしい。

アンインストールまでの手順

1. bundlerを入れる

sudo gem update
sudo gem install bundler

  bundle install を実行。以下のエラーが出る。

An error occurred while installing rmagick (2.13.2), and Bundler cannot
continue.
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.

RMagickを入れる

brew install imagemagick

 sudo gem install rmagick を実行したら、
 pkg-config: command not found と怒られたので、

brew install pkg-config
sudo gem install rmagick

今度こそbundle install

bundle install --without development test
Installing rmagick 2.13.2
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle

成功!

2. rake redmine:plugins:migrateを実行

再度rake redmine:plugins:migrate を実行しようとすると、以下のエラーが出る。

rake aborted!
You have already activated rake 0.9.6, but your Gemfile requires rake 10.1.1. Prepending `bundle exec` to your command may solve this.

activateしてるRakeのバージョンと、Gemfile.lockで固定しているバージョンが違っているのが原因らしい。
Gemfileで指定されたgem環境で実行できるように、bundle execをつけてやる。

bundle exec rake redmine:plugins:migrate NAME=プラグイン名 VERSION=0 RAILS_ENV=production

※ db:migrate_plugins は2.X系から非推奨になった模様。
http://www.redmine.org/projects/redmine/wiki/Plugins

3. プラグインを削除

/Applications/redmine-2.5.1-1/apps/redmine/htdocs/plugins/ 以下にあるプラグインをフォルダごと削除。

Redmineを再起動してやればOK。


間違いがあればご指摘ください。

13
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
15