myunuts's blog

プログラム関係をメモっています

メモ:Gitレポジトリの移行

codebreak; のサービス終了に伴い、Bitbucketに移行した。
Bitbucketを選択した理由は、ただ単に、Privateレポジトリを作成できるから。

で、移行手順をメモしておく。


事前準備
  • Bitbucketアカウントを作成
  • ローカルPC側のソースをcodebreakのmasterのソースを最新にしておく。
手順

コマンドラインでの操作になるが、下記の通り。
1.リモートリポジトリ(origin)を削除

> cd /path/to/my/repo
> git remote remove origin

2.新しいリポジトリ(同じくoriginで命名)を追加

git remote add origin https://usr@bitbucket.org/usr/repositoryname.git

3.ローカルリポジトリをリモートリポジトリに追加

git push -u origin --all
git push -u origin --tags


これで、Bitbucketのページで確認すると、今までのコミット履歴・Tagが移行されていました。

Redmine ガントチャートに日付を表示するプラグイン

環境

Bitnami
Redmine 2.5.2
Redmine 2.6.1

URL


vividtone/redmine_gantt_with_date · GitHub

手順

  1. ZIPでDLしてきたものを展開し、「C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs\plugins\以下に設置。
  2. bundle exec rake redmine:plugins:migrate RAILS_ENV=production (念のため)
  3. Redmine再起動

導入後のイメージ

f:id:myunuts:20150130155051p:plain

Redmine Issues XLS export プラグイン

環境

Bitnami
Redmine 2.5.2
Redmine 2.6.1

URL

但し、このPageで公開されているVersionでは動かないので、取得先は下記。

Tags 0.2.1.t7
を取得する

手順

Windowsメニューより「Bitnami Redmine Stack」-「Use Bitnami Redmine Stack」を選択し、コマンドプロンプトを立ち上げる。

  1. spreadsheet gem をインストール('gem install spreadsheet')
  2. rubyzip gem をインストール ('gem install rubyzip')
  3. 「Plugin views with revisions」をインストール
  4. C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs> bundle exec rake redmine:plugins:migrate RAILS_ENV=production
  5. C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs>bundle exec rake redmine:plugins:process_version_change RAILS_ENV=production
  6. Redmine再起動

さて、rakeから多少ハマったのでmemo.

Redmine 2.5.2

C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=production
[31mCould not find gem 'simplecov (>= 0) x86-mingw32' in the gems available on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m

$ bundle install
SSLのエラーが発生していた。

C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs>bundle install
Fetching source index from https://rubygems.org/
Fetching source index from http://rubygems.org/
Resolving dependencies...
Could not verify the SSL certificate for
https://rubygems.org/quick/Marshal.4.8/json-1.8.2-java.gemspec.rz.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification. For

information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without
using SSL, edit your Gemfile sources and change 'https' to 'http'.

redmine_xls_export\Gemfileを下記に修正。

#source 'https://rubygems.org'
source 'http://rubygems.org'

C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=production

C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs>bundle exec rake redmine:plugins:process_version_change RAILS_ENV=production
Redmine version: 2.5.2

でOK。

Redmine 2.6.1

C:\Bitnami\redmine-2.6.1-1\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=production
DL is deprecated, please use Fiddle
Could not find rubyzip-1.1.6 in any of the sources
Run `bundle install` to install missing gems.

C:\Bitnami\redmine-2.6.1-1\apps\redmine\htdocs>bundle install
DL is deprecated, please use Fiddle
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

If this is a development machine, remove the Gemfile freeze
by running `bundle install --no-deployment`.

You have added to the Gemfile:
* spreadsheet
* rubyzip (>= 1.1.3)
* zip-zip
* launchy
* simplecov

C:\Bitnami\redmine-2.6.1-1\apps\redmine\htdocs>bundle install --no-deployment
DL is deprecated, please use Fiddle
Fetching gem metadata from http://rubygems.org/.........
Resolving dependencies...
Installing rake 10.4.2
Installing i18n 0.6.11
Installing multi_json 1.10.1
Installing activesupport 3.2.21
Installing builder 3.0.4
Installing activemodel 3.2.21
Using erubis 2.7.0
Installing journey 1.0.4
Installing rack 1.4.5
Installing rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Installing sprockets 2.2.3
Installing actionpack 3.2.21
Installing mime-types 1.25.1
Installing polyglot 0.3.5
Installing treetop 1.4.15
Using mail 2.5.4
Installing actionmailer 3.2.21
Installing arel 3.0.3
Installing tzinfo 0.3.42
Installing activerecord 3.2.21
Installing activeresource 3.2.21
Using bundler 1.7.12
Installing coderay 1.1.0
Installing daemons 1.1.9
Installing eventmachine 1.0.3
Installing rack-ssl 1.3.4
Installing json 1.8.1
Installing rdoc 3.12.2
Installing thor 0.19.1
Installing railties 3.2.21
Installing jquery-rails 3.1.2
Installing mysql2 0.3.11
Installing net-ldap 0.3.1
Installing ruby-openid 2.3.0
Installing rack-openid 1.4.1
Installing rails 3.2.21
Installing rbpdf 1.18.4
Installing redcarpet 2.3.0
Installing request_store 1.0.5
Using rmagick 2.13.4
Using ruby-ole 1.2.11.8
Using rubyzip 1.1.6
Using spreadsheet 1.0.1
Using thin 1.6.1
Installing zip-zip 0.3
Updating files in vendor/cache
* ruby-ole-1.2.11.8.gem
* rubyzip-1.1.6.gem
* spreadsheet-1.0.1.gem
* zip-zip-0.3.gem
Your bundle is complete!
Gems in the groups development, test and sqlite were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!

C:\Bitnami\redmine-2.6.1-1\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=production
C:\Bitnami\redmine-2.6.1-1\apps\redmine\htdocs>bundle exec rake redmine:plugins:process_version_change RAILS_ENV=production

むむ。
rubyのVersionの違いにやられたっぽい・・・
ちょっと予想してなかった。

一応、OK。

Theme変更 redmine_theme_farend_fancy

設定していくのは、Windows7にいれているBitnamiのRedmine

Versionは2.5.2.

設置

DLしたZIPを展開し、フォルダ名を「farend_fancy」にリネーム。

私の環境だと下記にフォルダごとコピー。
C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs\public\themes

設定
  1. Redmineに管理者権限をもつアカウントでログイン。
  2. 「管理」より「設定」-「表示」タブを選択。
  3. テーマのプルダウンより選択し「保存」

これでOK。

適用前
f:id:myunuts:20150129110308p:plain

適用後
f:id:myunuts:20150129110551p:plain

Redmine 再び

以前に設定したRedmine用の管理者パスワードとかも忘れてしまい、
最初からまた構築したくなったので、以前のをアンインストール。

今回のBitnamiのVersionは2.6.0-1でした。

インストールは前回のものと同一手順でOKでした。

Windows7+Redmine

自PCで、課題管理をしたくなったので、なんとなく。
Excelでまとめるのはちょっといやだったので、試しにRedmineを入れてみることに。

ダウンロード

Windowsで、ひとつずつインストールも面倒だったので、
オールインワンパッケージを探してみた。

BitNami :: Redmine
http://bitnami.com/stack/redmine

このときのVersionは、2.5.2。

インストール

以下の通り、選択操作してインストールをした。

  • Language SelectionでEnglishを選択。

 ※日本語を選択すると、ウィザードで一部表示不正が出た。
アンチウイルスソフト~~~」といった警告ダイアログが出たけど、
無視して続行。

  • インストールフォルダを選択。デフォルトのままで変更せず。
  • 管理者アカウントを作成。Redmine用のユーザ名とパスワード等を指定。
  • データベースに保管する際の規定の言語。ここでは、日本語(Japanese)を選択。
  • SMTP設定。通知メールは不要なので、そのまま次へ。
  • インストール準備ができたと表示されるので、そのまま次へ。

インストールが開始されるので、そのまま終わるまで待つ。

アクセス

インストール完了後、
http://localhost/
で、BitNamiのWelcomeページが表示される。

そこから、「Access」というリンクをクリック。
すると、Redmineのページへ移動。
URL。
http://localhost/redmine/

このページの右上の「ログイン」リンクから、
インストール時に設定したユーザ/パスワードでログイン。