daddygongon / my_help Goto Github PK
View Code? Open in Web Editor NEWLike CUI(CLI) help, the user makes and displays his own help.
License: MIT License
Like CUI(CLI) help, the user makes and displays his own help.
License: MIT License
rspecでエラーが出ました
> bundle exec rspec (base)
my_help cli_spec.rb by aruba
version option
is expected to be successfully executed
is expected to have output: "1.0c"
no option
is expected to be successfully executed
is expected to have output: /^Commands:/
list option
example2が新たに作られる
"/Users/hoshino/my_help/.my_help/example2.org"
list with name (FAILED - 1)
my_help delete実行時にそのままEnterを入力しても削除が行われない
[Ynq]の選択肢のうち, yが大文字なので未入力の場合はY(削除)が実行されるべきと思われる
%my_help delete test
my_help delete test
Are you sure to delete /home/user/.my_help/test.org?[Ynq]
%my_help delete test
my_help delete test
Are you sure to delete /home/user/.my_help/test.org?[Ynq] y
%my_help delete test
my_help delete test
Are you sure to delete /home/user/.my_help/test.org?[Ynq] Y
rm /home/user/.my_help/test.org
OS: mac 10.14.5
ruby: 2.7.0p0
gem: 3.1.2
例えば、以下のようにnew_help.orgを作成します:
* license
- cc by Shigeto R. Nishitani, 2016
* head
- 新しいヘルプ
* item1_example
- item1
* item2_example
- item2
my_help list new_help
を実行すると、"item1_example"に対応するアイテム名は"-i"と設定されますが、"item2_example"に対応するアイテム名は設定されません:
- 新しいヘルプ
, head : head
, license : license
-i, item1_example : item1_example
, item2_example : item2_example
この状態でmy_help list new_help -i
を実行すると、"item1_example"のみに関するヘルプが表示されます:
- 新しいヘルプ
-----
item1_example
- item1
orgファイルにある見出しの頭文字がITEM名になるので、このような挙動になるのだと思います。頭文字が同じである場合は、番号をつけるか、自分でITEM名を指定できるようなオプションが欲しいです。よろしくお願いします。
Mac OS X El Capitan 10.11.3
インストール完了しました
$ sudo gem install my_help
$ my_help
Commands:
my_help delete {help_name} # delete HELP_NAME
my_help edit {help_name} # edit HELP_NAME
my_help help [COMMAND] # Describe available commands or one specific command
my_help list # list all helps, specific HELP, or item
my_help new {help_name} # make new HELP_NAME
my_help search {find_char} # search FIND_CHAR
my_help tomo_upload {help_name} # tomo_upload HELP_NAME
$ my_help -v
Could not find command "_v".
$ my_help list
/var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:14:in set_help_dir_if_not_exists': uninitialized constant MyHelp::Control::FileUtils (NameError) Did you mean? FileTest from /var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:9:in
initialize'
from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:8:in new' from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:8:in
list'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/command.rb:27:in run' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
invoke_command'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor.rb:387:in dispatch' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/base.rb:466:in
start'
from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:52:in <top (required)>' from /usr/local/bin/my_help:22:in
load'
from /usr/local/bin/my_help:22:in `
list を表示しようとすると、NameError? がでる。10分奮闘したが、解決できなかった。
オプションを指定すると、not find command が表示される。← ?
my_help -iで新しいhelpを作るときに,前のhelp名と重なっているかを表示すべき
Manualにしたがって、行いましたが、
rake install:local
で失敗しました。 sudoがいりました。
OS:Ubuntu 18.04
Shell: zsh
Editor: neovim
インストール、動作ともに成功した
[koshipakaman ~]% sudo gem install -p http://proxy.kwansei.ac.jp:8080 my_help
Fetching: my_help-0.8.3.gem (100%)
Successfully installed my_help-0.8.3
Parsing documentation for my_help-0.8.3
Installing ri documentation for my_help-0.8.3
Done installing documentation for my_help after 0 seconds
1 gem installed
os: windows 10 Pro
shell: git bash
インストール可否: 成功
実行可否: 不可
インストールできましたが,version確認時にエラーが出ます.
terap@DESKTOP-R6FHGQA MINGW64 ~/my_help (master)
$ my_help version
C:/Ruby26-x64/lib/ruby/2.6.0/psych.rb:577:in initialize': No such file or directory @ rb_sysopen - C:\Users\terap/.my_help/.my_help_conf.yml (Errno::ENOENT) from C:/Ruby26-x64/lib/ruby/2.6.0/psych.rb:577:in
open'
from C:/Ruby26-x64/lib/ruby/2.6.0/psych.rb:577:in load_file' from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/my_help-0.8.2/lib/my_help/my_help_controll.rb:34:in
load_conf'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/my_help-0.8.2/lib/my_help/my_help_controll.rb:17:in initialize' from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/my_help-0.8.2/exe/my_help:8:in
new'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/my_help-0.8.2/exe/my_help:8:in setup' from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in
run'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in invoke_command' from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in
dispatch'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in invoke' from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/my_help-0.8.2/exe/my_help:35:in
version'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in run' from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
invoke_command'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in dispatch' from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in
start'
from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/my_help-0.8.2/exe/my_help:70:in <top (required)>' from C:/Ruby26-x64/bin/my_help:23:in
load'
from C:/Ruby26-x64/bin/my_help:23:in `
成功した。
os:ubuntu 16.04.6
shell:bash
editor:code
1.sudo gem install thor
2.sudo gem install my_help
don't work on version check.
change line order between
load_conf
and
set_dir ...
T.Tanakaです.
macOS Sierra バージョン10.12.6にて
my_helpをインストールします.よろしくお願いします.
my_helpを多様な環境で動作するように改良する.
mac + emacs でしか動かせてない.
os:Windows Subsystem for Linux Ubuntu 18.04 LTS
gem install my_help だとインストール失敗
Fetching: gli-2.17.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.5.0 directory.
sudo gem install my_help だとインストール成功
Fetching: gli-2.17.1.gem (100%)
Successfully installed gli-2.17.1
Fetching: my_help-0.8.0.gem (100%)
Successfully installed my_help-0.8.0
Parsing documentation for gli-2.17.1
Installing ri documentation for gli-2.17.1
Parsing documentation for my_help-0.8.0
Installing ri documentation for my_help-0.8.0
Done installing documentation for gli, my_help after 1 seconds
2 gems installed
my_help インストールに成功した?だがしかし動かない
Traceback (most recent call last):
4: from /usr/local/bin/my_help:23:in <main>' 3: from /usr/local/bin/my_help:23:in
load'
2: from /var/lib/gems/2.5.0/gems/my_help-0.8.0/exe/my_help:2:in <top (required)>' 1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- thor (LoadError)
sudo gem install thor thorをインストールしてみた
Fetching: thor-0.20.3.gem (100%)
Successfully installed thor-0.20.3
Parsing documentation for thor-0.20.3
Installing ri documentation for thor-0.20.3
Done installing documentation for thor after 1 seconds
1 gem installed
my_help thorをインストール後動くようになった
Commands:
/var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/shell/basic.rb:399: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
my_help delete {help_name} # delete HELP_NAME
my_help edit {help_name} # edit HELP_NAME
my_help help [COMMAND] # Describe available commands or one specific command
my_help list # list all helps, specific HELP, or item
my_help new {help_name} # make new HELP_NAME
my_help search {find_char} # search FIND_CHAR
my_help tomo_upload {help_name} # tomo_upload HELP_NAME
echo "gem 'my_help'" >> Gemfile
bundle install --path vendor/bundle
bundle exec my_help
Commands:
my_help delete HELP # delete HELP
my_help edit HELP # edit HELP
my_help help [COMMAND] # Describe available commands or one specific command
my_help list [HELP] [ITEM] # list all helps, specific HELP, or ITEM
my_help new HELP # make new HELP
my_help set_editor EDITOR_NAME # set editor to EDITOR_NAME
my_help setup # set up the test database
my_help version # show version
bundle exec my_help list
mkdir -p /Users/iori/.my_help
cp /Users/iori/nishitani/grad_lecture_19/members/iori-muguruma/vendor/bundle/ruby/2.3.0/gems/my_help-0.8.3/lib/templates/org.org /Users/iori/.my_help
cp /Users/iori/nishitani/grad_lecture_19/members/iori-muguruma/vendor/bundle/ruby/2.3.0/gems/my_help-0.8.3/lib/templates/todo.org /Users/iori/.my_help
cp /Users/iori/nishitani/grad_lecture_19/members/iori-muguruma/vendor/bundle/ruby/2.3.0/gems/my_help-0.8.3/lib/templates/emacs.org /Users/iori/.my_help
#<Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/iori/.my_help/.my_help_conf.yml>
List all helps
org: - emacs org-modeのhelp
todo: - my todo
emacs: - Emacs key bind
何かエラー出たけどもう一度実行.
bundle exec my_help list
List all helps
org: - emacs org-modeのhelp
todo: - my todo
emacs: - Emacs key bind
成功?
bundle exec my_help editor vim
Could not find command "editor".
Deprecation warning: Thor exit with status 0 on errors. To keep this behavior, you must define `exit_on_failure?` in `MyCLI`
You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.
ん? と思ったので,
bundle exec my_help help
Commands:
my_help delete HELP # delete HELP
my_help edit HELP # edit HELP
my_help help [COMMAND] # Describe available commands or one specific command
my_help list [HELP] [ITEM] # list all helps, specific HELP, or ITEM
my_help new HELP # make new HELP
my_help set_editor EDITOR_NAME # set editor to EDITOR_NAME
my_help setup # set up the test database
my_help version # show version
README では 'set_editor' となっているのでそちらで実行.
bundle exec my_help set_editor vim
成功.
こんにちは、Natsuko です。
org モードのサンプルを置きました。
OS:macOS Catalina(10.15.1)
shell:fish
インストール可否:成功
実行可否:不可
インストールはできたが、バージョン確認する際にエラーが発生してしまう。
以下にそれまでの手順を記す。
yu-ma@dml1x07 ~/g/g/m/morino> my_help version
Traceback (most recent call last):
4: from /usr/local/bin/my_help:23:in <main>' 3: from /usr/local/bin/my_help:23:in
load'
2: from /Library/Ruby/Gems/2.6.0/gems/my_help-0.8.0/exe/my_help:2:in <top (required)>' 1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- thor (LoadError)
↓
sudo gem install thor -p http://proxy.kwansei.ac.jp:8080
↓
yu-ma@dml1x07 ~/g/g/m/morino> my_help version
Could not find command "version".
↓
git clone [email protected]:daddygongon/my_help.git
↓
yu-ma@dml1x07 ~/g/g/m/m/my_help> rake install:local
rake aborted!
LoadError: cannot load such file -- yard
/Users/yu-ma/github/grad_lecture_19/members/morino/my_help/Rakefile:3:in <top (required)>' /Library/Ruby/Gems/2.6.0/gems/rake-12.3.2/exe/rake:27:in
<top (required)>'
(See full trace by running task with --trace)
↓
sudo gem install yard -p http://proxy.kwansei.ac.jp:8080
↓
yu-ma@dml1x07 ~/g/g/m/m/my_help> rake install:local
my_help 0.8.2 built to pkg/my_help-0.8.2.gem.
rake aborted!
Couldn't install gem, run gem install /Users/yu-ma/github/grad_lecture_19/members/morino/my_help/pkg/my_help-0.8.2.gem' for more detailed output /Library/Ruby/Gems/2.6.0/gems/rake-12.3.2/exe/rake:27:in
<top (required)>'
Tasks: TOP => install:local
(See full trace by running task with --trace)
↓
sudo gem install /Users/yu-ma/github/grad_lecture_19/members/morino/my_help/pkg/my_help-0.8.2.gem -p http://proxy.kwansei.ac.jp:8080
↓
yu-ma@dml1x07 ~/g/g/m/m/my_help> my_help version
Traceback (most recent call last):
18: from /usr/local/bin/my_help:23:in <main>' 17: from /usr/local/bin/my_help:23:in
load'
16: from /Library/Ruby/Gems/2.6.0/gems/my_help-0.8.2/exe/my_help:70:in <top (required)>' 15: from /Library/Ruby/Gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in
start'
14: from /Library/Ruby/Gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in dispatch' 13: from /Library/Ruby/Gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
invoke_command'
12: from /Library/Ruby/Gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in run' 11: from /Library/Ruby/Gems/2.6.0/gems/my_help-0.8.2/exe/my_help:35:in
version'
10: from /Library/Ruby/Gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in invoke' 9: from /Library/Ruby/Gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in
dispatch'
8: from /Library/Ruby/Gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in invoke_command' 7: from /Library/Ruby/Gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in
run'
6: from /Library/Ruby/Gems/2.6.0/gems/my_help-0.8.2/exe/my_help:8:in setup' 5: from /Library/Ruby/Gems/2.6.0/gems/my_help-0.8.2/exe/my_help:8:in
new'
4: from /Library/Ruby/Gems/2.6.0/gems/my_help-0.8.2/lib/my_help/my_help_controll.rb:17:in initialize' 3: from /Library/Ruby/Gems/2.6.0/gems/my_help-0.8.2/lib/my_help/my_help_controll.rb:34:in
load_conf'
2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych.rb:577:in load_file' 1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych.rb:577:in
open'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/psych.rb:577:in `initialize': No such file or directory @ rb_sysopen - /Users/yu-ma/.my_help/.my_help_conf.yml (Errno::ENOENT)
os : debian 9
カーネル:Linux wei 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2019-06-16) x86_64 GNU/Linux
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
gem : 2.5.2.1
インストール可否 : 成功
my_help new {help_name} を実行すると、エラーが出る
% my_help new kaz
/var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:14:in set_help_dir_if_not_exists': uninitialized constant MyHelp::Control::FileUtils (NameError) Did you mean? FileTest from /var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:9:in
initialize'
from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:28:in new' from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:28:in
new'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/command.rb:27:in run' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
invoke_command'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor.rb:387:in dispatch' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/base.rb:466:in
start'
from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:52:in <top (required)>' from /usr/local/bin/my_help:22:in
load'
from /usr/local/bin/my_help:22:in `
存在しないコマンドを入れた時に出てくる"Could not find **command"のコマンド名の表示の一部がおかしくなる(具体的には先頭に半角ハイフンを入れた時)
%my_help aaaa
my_help aaaa
Could not find command "aaaa".
%my_help aa-aa
my_help aa-aa
Could not find command "aa-aa".
%my_help -aaaa
my_help -aaaa
Could not find command "_aaaa".
Mac(10.14.6), zsh
my_help list や my_help emacsはできるが,
my_help versionだけできない
-my_help version
Could not find command "version".
gem install my_helpを行うと
0.8.1でなく0.8.0が入る
-gem install my_help
Successfully installed my_help-0.8.0
1 gem installed
emacsは開くがatom, vimは開かない
-my_help edit emacs
"/Users/reina/.my_help/emacs.org"
-my_help edit vim
"/Users/reina/.my_help/vim.org"
file /Users/reina/.my_help/vim.org does not exits in /Users/reina/.my_help.
init vim first.
-my_help edit atom
"/Users/reina/.my_help/atom.org"
file /Users/reina/.my_help/atom.org does not exits in /Users/reina/.my_help.
init atom first.
my_helpをalpine linux上で動作させるため、以下のDockerfileを作成しました。
FROM alpine:3.7
ENV http_proxy <YOUR PROXY HERE>
ENV https_proxy <YOUR PROXY HERE>
RUN apk update && apk upgrade
RUN apk --update add \
openssh git build-base libffi libffi-dev \
ruby ruby-dev ruby-rake ruby-bundler
RUN git clone https://github.com/daddygongon/my_help.git
WORKDIR my_help
RUN bundle update
RUN bundle exec exe/my_help -m && rake install:local
プロキシは適宜書き換えてください。
ビルド時のアカウントに関するエラーを除けば大体は問題なく動作しています。
# build an image named 'my-help'
$ docker build -t my-help .
...
# run a container
$ docker run -it --rm my-help:latest emacs_help
emacsのキーバインド
特殊キー操作
c-f, controlキーを押しながら 'f'
M-f, escキーを押した後一度離して'f'
操作の中断c-g, 操作の取り消し(Undo) c-x u
cc by Shigeto R. Nishitani, 2016
Usage: emacs_help [options]
-v, --version show program Version.
-c, --cursor Cursor移動
-p, --ページ Page移動
-f, --ファイル File操作
-e, --編集 Edit操作
-w, --ウィンドウ Window操作
-b, --バッファ Buffer操作
-q, --終了 終了操作
--edit edit help contentsを開く
--to_hiki hikiのformatに変更する
--all すべてのhelp画面を表示させる
--store [item] store [item] でback upをとる
--remove [item] remove [item] back upしてるlistを消去する
--add [item] add new [item]で新しいhelpを作る
--backup_list [val] back upしているlistを表示させる
以下に環境に関する情報を記載しておきます。
$ uname -a
Linux ac01a6741ae3 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3 (2017-12-03) x86_64 Linux
$ cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.7.0
PRETTY_NAME="Alpine Linux v3.7"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
「my_help new " * "」でorgを作成して同じく「my_help edit " * "」で編集しようとすると直接表示が行われない(.my_help内の全てのorgが候補になっていると思われる)
%my_help new " * "
my_help new " * "
"/home/user/.my_help/.org"
"/home/user/.anyenv/envs/rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/my_help-0.8.0/lib/templates/help_template.org"
cp /home/user/.anyenv/envs/rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/my_help-0.8.0/lib/templates/help_template.org /home/user/.my_help/.org
%my_help edit " * "
my_help edit ""
"/home/user/.my_help/.org"
> my_help
NAME
my_help - make own help and list.
SYNOPSIS
my_help [global options] command [command options] [arguments...]
VERSION
0.7.0
GLOBAL OPTIONS
--help - Show this message
--version - Display the program version
COMMANDS
delete - delete HELP_NAME help
edit - edit HELP_NAME help
help - Shows a list of commands or help for one command
list - list all helps, specific HELP, or item
new - make new HELP_NAME
> my_help
Commands:
my_help delete {help_name} # delete HELP_NAME
my_help edit {help_name} # edit HELP_NAME
my_help editor {editor_name} # set editor
my_help help [COMMAND] # Describe available commands or one specific command
my_help list # list helps, specific HELP, or item
my_help new {help_name} # make new HELP_NAME
my_help search {find_char} # search FIND_CHAR
my_help setup # set up the test database
my_help version # show version
以下の環境において無事インストールが完了しました。
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.04
DISTRIB_CODENAME=zesty
DISTRIB_DESCRIPTION="Ubuntu 17.04"
これからインストールさせてもらいます。
環境は、linux debian (version 7.11) です。
よろしくお願いします。
OS:Win10 Pro
Shell:Windows Powershell
Editor:Sublime Text 3
my_help version を実行しようとしたときに"cannot load such file -- thor" エラーが出ました.
また,githubからcloneしてver0.8.2をinstallする際,rake install:local の実行時に"cannot load such file -- yard"エラーが出ました.
それぞれ gem install thor,gem install yardで足りないと言われたgemをinstallすることにより,いずれのエラーも解消しました
これからinstallさせてもらいます.よろしくお願いします.
os: Debian GNU/Linux 10
ruby: 2.5.5
gem: 2.7.6.2
shell: zsh 5.7.1 (x86_64-debian-linux-gnu)
実行可否: 不可
gem install thor
で、使えるようになった。
環境
OS: Linux Debian 9.0
Shell: zsh
Editor: emacs
0.8.0
gem install で
set_help_dir_if_not_exists': uninitialized constant MyHelp::Control::FileUtils (NameError) Did you mean? FileTest from /var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:9:in
initialize'new' from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:28:in
new'run' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
invoke_command'dispatch' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/base.rb:466:in
start'<top (required)>' from /usr/local/bin/my_help:22:in
load'ryuichiro@StudioOne[0]: my_help new test [~]
/var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:14:in set_help_dir_if_not_exists': uninitialized constant MyHelp::Control::FileUtils (NameError) Did you mean? FileTest from /var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:9:in
initialize'
from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:8:in new' from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:8:in
list'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/command.rb:27:in run' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
invoke_command'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor.rb:387:in dispatch' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/base.rb:466:in
start'
from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:52:in <top (required)>' from /usr/local/bin/my_help:22:in
load'
from /usr/local/bin/my_help:22:in `
予想: 必要なディレクトリがない?
エラーメッセージから bundler が足りなさそうなのでインストール
--------------------- ここから ----------------------
ryuichiro@StudioOne[0]: sudo gem install bundler -r -p http://proxy.ksc.kwansei.ac.jp:8080 [~/my_help]
[sudo] password for ryuichiro:
Fetching: bundler-2.0.2.gem (100%)
Successfully installed bundler-2.0.2
Parsing documentation for bundler-2.0.2
Installing ri documentation for bundler-2.0.2
Done installing documentation for bundler after 3 seconds
1 gem installed
--------------------- ここまで ----------------------
もう一度 rake コマンドを行うが、再びエラー
--------------------- ここから ----------------------
ryuichiro@StudioOne[0]: rake [~/my_help]
rake aborted!
LoadError: cannot load such file -- yard
/home/ryuichiro/my_help/Rakefile:3:in `<top (required)>'
(See full trace by running task with --trace)
--------------------- ここまで ----------------------
As of YARD v0.9.2:
RubyGems "--document=yri,yard" hooks are now supported. You can auto-configure
YARD to automatically build the yri index for installed gems by typing:
$ yard config --gem-install-yri
See yard config --help
for more information on RubyGems install hooks.
You can also add the following to your .gemspec to have YARD document your gem
on install:
spec.metadata["yard.run"] = "yri" # use "yard" to build full HTML docs.
Successfully installed yard-0.9.20
Parsing documentation for yard-0.9.20
Installing ri documentation for yard-0.9.20
Done installing documentation for yard after 3 seconds
1 gem installed
--------------------- ここまで ----------------------
再び rake コマンドを打ち込む
ryuichiro@StudioOne[0]: rake
エラーも特に出ずに動いた
インストールさせて頂きます.
環境は, Ubuntu16.04 日本語版です.
よろしくお願いします.
os:windows 10 pro
shell:CMD
editor:
C:\Users\lab>export http_proxy=http://proxy.kwansei.ac.jp:8080
'export' は、内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。
-----proxy設定するとき,エラーが起きた .
C:\Users\lab>set http_proxy=http://proxy.kwansei.ac.jp:8080
-----exportの代わりにsetを入れてインストールできた.
C:\Users\lab>gem install my_help
Fetching my_help-0.8.0.gem
Fetching gli-2.17.1.gem
Successfully installed gli-2.17.1
Successfully installed my_help-0.8.0
Parsing documentation for gli-2.17.1
Installing ri documentation for gli-2.17.1
Parsing documentation for my_help-0.8.0
Installing ri documentation for my_help-0.8.0
Done installing documentation for gli, my_help after 2 seconds
2 gems installed
C:\Users\lab>gem install thor
Fetching thor-0.20.3.gem
Successfully installed thor-0.20.3
Parsing documentation for thor-0.20.3
Installing ri documentation for thor-0.20.3
Done installing documentation for thor after 2 seconds
1 gem installed
C:\Users\lab>my_help
Commands:
my_help delete {help_name} # delete HELP_NAME
my_help edit {help_name} # edit HELP_NAME
my_help help [COMMAND] # Describe available commands or one speci...
my_help list # list all helps, specific HELP, or item
my_help new {help_name} # make new HELP_NAME
my_help search {find_char} # search FIND_CHAR
my_help tomo_upload {help_name} # tomo_upload HELP_NAME
------これから,githubからmy_help ダウンロードしてインストールする.
C:\Users\lab>git clone [email protected]:daddygongon/my_help.git
Cloning into 'my_help'...
Warning: Permanently added the RSA host key for IP address '52.69.186.44' to the list of known hosts.
remote: Enumerating objects: 235, done.
remote: Counting objects: 100% (235/235), done.
remote: Compressing objects: 100% (139/139), done.
remote: Total 4121 (delta 123), reused 195 (delta 89), pack-reused 3886Receiving objects: 98% (4039/4121), 51.07 MiB |
Receiving objects: 100% (4121/4121), 52.39 MiB | 5.23 MiB/s, done.
Resolving deltas: 100% (2320/2320), done.
------インストールできた
C:\Users\lab>cd my_help
C:\Users\lab\my_help>dir
ドライブ C のボリューム ラベルは Windows です
ボリューム シリアル番号は B04E-30C0 です
C:\Users\lab\my_help のディレクトリ
2019/12/11 15:57
.------インストールしたmy_helpが見えた
C:\Users\lab\my_help>rake install:local
rake aborted!
LoadError: cannot load such file -- yard
C:/Users/lab/my_help/Rakefile:3:in `<top (required)>'
(See full trace by running task with --trace)
------謎のエラーが出た
webに比べてtextは醜い.せめて,word, line, columne, areaをcolor化できると見やすい.
ubuntu (18.04.3) / zsh
$gem install my_help
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.5.0 directory.
でインストール出来なかった。
$sudo gem install my_help
Fetching: gli-2.17.1.gem (100%)
Successfully installed gli-2.17.1
Fetching: my_help-0.8.0.gem (100%)
Successfully installed my_help-0.8.0
Parsing documentation for gli-2.17.1
Installing ri documentation for gli-2.17.1
Parsing documentation for my_help-0.8.0
Installing ri documentation for my_help-0.8.0
Done installing documentation for gli, my_help after 0 seconds
2 gems installed
インストールされたが 0.8.0 がインストールされた.
$ my_help list
Traceback (most recent call last):
4: from /usr/local/bin/my_help:23:in <main>' 3: from /usr/local/bin/my_help:23:in
load'
2: from /var/lib/gems/2.5.0/gems/my_help-0.8.0/exe/my_help:2:in <top (required)>' 1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- thor (LoadError)
どのコマンドを入力してもエラーが出る.
$sudo gem install thor
Fetching: thor-0.20.3.gem (100%)
Successfully installed thor-0.20.3
Parsing documentation for thor-0.20.3
Installing ri documentation for thor-0.20.3
Done installing documentation for thor after 0 seconds
1 gem installed
thor をインストールした
$my_help list
List all helps
emacs: - Emacs key bind
todo: - my todo
org: - emacs org-modeのhelp
正しく表示が出来た
$my_help version
Could not find command "version".
$my_help edit atom
"/home/azu/.my_help/atom.org"
file /home/azu/.my_help/atom.org does not exits in /home/azu/.my_help.
init atom first.
エラーが出る.
環境
OS: macOS 10.14.5
ruby: 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
gem: 2.5.2.3
コマンド
gem install my_help
結果
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
考察
システムのgemを使っているため、パーミッションが無い?
my_helpをインストールさせていただきます。
環境はUbuntu16.04です。
よろしくお願いいたします。
os: ubuntu 16.04 on wsl on windows10
shell: fish on terminal
editro: code
下のようにerrorがでます.これはgemの修正が必要です.
さらにcodeが起動できないはずです.
codeのlinkをfishにおしえないといけないです.これはlocalの作業です.
‘‘‘
/m/c/U/b/Desktop my_help Wed 25 Dec 2019 10:20:57 AM JSTmy_help: command not found
! /m/c/U/b/Desktop gem install my_help 2583ms Wed 25 Dec 2019 10:26:58 AM JSTFetching: thor-1.0.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.3.0 directory.
! /m/c/U/b/Desktop ls /var/lib/gems 4547ms Wed 25 Dec 2019 10:27:08 AM JST2.3.0/
/m/c/U/b/Desktop ls -lat /var/lib/gems Wed 25 Dec 2019 10:27:34 AM JSTtotal 0
drwxr-xr-x 1 root root 4096 Dec 19 13:21 ./
drwxr-xr-x 1 root root 4096 Dec 19 13:21 ../
drwxr-xr-x 1 root root 4096 Nov 26 02:58 2.3.0/
/m/c/U/b/Desktop sudo chown -R bob /var/lib/gems Wed 25 Dec 2019 10:27:41 AM JST[sudo] password for bob:
Sorry, try again.
[sudo] password for bob:
/m/c/U/b/Desktop gem install my_help 10.5s Wed 25 Dec 2019 10:28:14 AM JSTFetching: thor-1.0.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/bin directory.
! /m/c/U/b/Desktop sudo chown -R bob /usr/local/bin 1781ms Wed 25 Dec 2019 10:28:22 AM JST /m/c/U/b/Desktop gem install my_help 122ms Wed 25 Dec 2019 10:28:38 AM JSTSuccessfully installed thor-1.0.1
Fetching: colorize-0.8.1.gem (100%)
Successfully installed colorize-0.8.1
Fetching: my_help-0.8.3.gem (100%)
Successfully installed my_help-0.8.3
Parsing documentation for thor-1.0.1
Installing ri documentation for thor-1.0.1
Parsing documentation for colorize-0.8.1
Installing ri documentation for colorize-0.8.1
Parsing documentation for my_help-0.8.3
Installing ri documentation for my_help-0.8.3
Done installing documentation for thor, colorize, my_help after 4 seconds
3 gems installed
/m/c/U/b/Desktop my_help 6.9s Wed 25 Dec 2019 10:28:50 AM JSTCommands:
/var/lib/gems/2.3.0/gems/thor-1.0.1/lib/thor/shell/basic.rb:399: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
my_help delete HELP # delete HELP
my_help edit HELP # edit HELP
my_help help [COMMAND] # Describe available commands or one specific command
my_help list [HELP] [ITEM] # list all helps, specific HELP, or ITEM
my_help new HELP # make new HELP
my_help set_editor EDITOR_NAME # set editor to EDITOR_NAME
my_help setup # set up the test database
my_help version # show version /m/c/U/b/Desktop my_help Wed 25 Dec 2019 10:20:57 AM JSTmy_help: command not found
! /m/c/U/b/Desktop gem install my_help 2583ms Wed 25 Dec 2019 10:26:58 AM JSTFetching: thor-1.0.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.3.0 directory.
! /m/c/U/b/Desktop ls /var/lib/gems 4547ms Wed 25 Dec 2019 10:27:08 AM JST2.3.0/
/m/c/U/b/Desktop ls -lat /var/lib/gems Wed 25 Dec 2019 10:27:34 AM JSTtotal 0
drwxr-xr-x 1 root root 4096 Dec 19 13:21 ./
drwxr-xr-x 1 root root 4096 Dec 19 13:21 ../
drwxr-xr-x 1 root root 4096 Nov 26 02:58 2.3.0/
/m/c/U/b/Desktop sudo chown -R bob /var/lib/gems Wed 25 Dec 2019 10:27:41 AM JST[sudo] password for bob:
Sorry, try again.
[sudo] password for bob:
/m/c/U/b/Desktop gem install my_help 10.5s Wed 25 Dec 2019 10:28:14 AM JSTFetching: thor-1.0.1.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/bin directory.
! /m/c/U/b/Desktop sudo chown -R bob /usr/local/bin 1781ms Wed 25 Dec 2019 10:28:22 AM JST /m/c/U/b/Desktop gem install my_help 122ms Wed 25 Dec 2019 10:28:38 AM JSTSuccessfully installed thor-1.0.1
Fetching: colorize-0.8.1.gem (100%)
Successfully installed colorize-0.8.1
Fetching: my_help-0.8.3.gem (100%)
Successfully installed my_help-0.8.3
Parsing documentation for thor-1.0.1
Installing ri documentation for thor-1.0.1
Parsing documentation for colorize-0.8.1
Installing ri documentation for colorize-0.8.1
Parsing documentation for my_help-0.8.3
Installing ri documentation for my_help-0.8.3
Done installing documentation for thor, colorize, my_help after 4 seconds
3 gems installed
/m/c/U/b/Desktop my_help 6.9s Wed 25 Dec 2019 10:28:50 AM JSTCommands:
/var/lib/gems/2.3.0/gems/thor-1.0.1/lib/thor/shell/basic.rb:399: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
my_help delete HELP # delete HELP
my_help edit HELP # edit HELP
my_help help [COMMAND] # Describe available commands or one specific command
my_help list [HELP] [ITEM] # list all helps, specific HELP, or ITEM
my_help new HELP # make new HELP
my_help set_editor EDITOR_NAME # set editor to EDITOR_NAME
my_help setup # set up the test database
my_help version # show version
/m/c/U/b/Desktop my_help set_editor code 532ms Wed 25 Dec 2019 10:28:55 AM JSTmkdir -p /home/bob/.my_help
cp /var/lib/gems/2.3.0/gems/my_help-0.8.3/lib/templates/emacs.org /home/bob/.my_help
cp /var/lib/gems/2.3.0/gems/my_help-0.8.3/lib/templates/org.org /home/bob/.my_help
cp /var/lib/gems/2.3.0/gems/my_help-0.8.3/lib/templates/todo.org /home/bob/.my_help
#<Errno::ENOENT: No such file or directory @ rb_sysopen - /home/bob/.my_help/.my_help_conf.yml>
/m/c/U/b/Desktop my_help set_editor code 532ms Wed 25 Dec 2019 10:28:55 AM JSTmkdir -p /home/bob/.my_help
cp /var/lib/gems/2.3.0/gems/my_help-0.8.3/lib/templates/emacs.org /home/bob/.my_help
cp /var/lib/gems/2.3.0/gems/my_help-0.8.3/lib/templates/org.org /home/bob/.my_help
cp /var/lib/gems/2.3.0/gems/my_help-0.8.3/lib/templates/todo.org /home/bob/.my_help
#<Errno::ENOENT: No such file or directory @ rb_sysopen - /home/bob/.my_help/.my_help_conf.yml>
windows 10 pro, cmd, atom
export http_proxy=http://proxy.kwansei.ac.jp:8080
'export' は、内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。
cmdはexportではなくset
set http_proxy=http://proxy.kwansei.ac.jp:8080
my_helpとthorのインストール
gem install my_help
gem install thor
version
my_help 0.8.0
ruby 2.6.4
rake エラー吐く
rake install:local
rake aborted!
LoadError: cannot load such file -- yard
C:/Users/lab/Desktop/my_help/Rakefile:3:in `<top (required)>'
(See full trace by running task with --trace)
gem install rakeしたけど無理でした
Windows10 Home, cmd, atom
インストール成功
ver 0.8.2(my_help), 2.6.5(ruby)
I've got the following error;
my_help list iferc
error: invalid byte sequence in US-ASCII
ubuntu 16.04無事インストール完了しました。
インストール:成功
C:\Users\Y.Kimura\test1\grad_lecture_19\members\kimura>gem install -p http://proxy.ksc.kwansei.ac.jp:8080 my_help
Fetching my_help-0.8.3.gem
Fetching thor-1.0.1.gem
Successfully installed thor-1.0.1
Successfully installed my_help-0.8.3
Parsing documentation for thor-1.0.1
Installing ri documentation for thor-1.0.1
Parsing documentation for my_help-0.8.3
Installing ri documentation for my_help-0.8.3
Done installing documentation for thor, my_help after 5 seconds
2 gems installed
$ uname -a
Linux resedet 4.9.189 #1 SMP Mon Oct 7 10:55:57 JST 2019 x86_64GNU/Linux
$ cat /etc/debian_version
9.9
$ emacs --version
GNU Emacs 25.1.1
Copyright (C) 2016 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$ ruby -v
ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]
$ gem -v
2.5.2.1
my_help list emacs -f では正しく出力結果が表示されるが、
my_help list emacs file では途中までは表示されるが、エラーが起きる。
以下を実行した。
$ sudo gem install my_help
$ sudo gem install thor
$ my_help help delete
Usage:
my_help delete {help_name}delete HELP_NAME
$ my_help new new_help
/var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:14:in
'set_help_dir_if_not_exists': uninitialized constant MyHelp::Control::FileUtils (NameError) Did you mean? FileTest from /var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:9:in
initialize'
from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:28:innew' from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:28:in
new'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/command.rb:27:inrun' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in
invoke_command'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor.rb:387:indispatch' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/base.rb:466:in
start'
from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:52:in<top (required)>' from /usr/local/bin/my_help:22:in
load'
from /usr/local/bin/my_help:22:in `
my_help_controll.rb が以前の version? になっている。
以下を my_help_controll.rb に追加したら動いた。
require 'fileutils'
require 'yaml'
$ my_help list
List all helps
org: - emacs org-modeのhelp
new_help: - ヘルプのサンプル雛形
emacs: - Emacs key bind
todo: - my todo
$ my_help list emacs -f
- Emacs key bind
special key command
- c-f, While pressing the control key, press 'f'
- M-f, After pressing Esc key, press 'f'
- c-g, Operation interruption
- c-x u, Undo operation(Undo)
file operation file
- c-x c-f, Find file, Find file
- c-x c-s, Save file, Save file
- c-x c-w, Write file NAME, Write a file with another name
$ my_help list emacs file
- Emacs key bind
special key command
- c-f, While pressing the control key, press 'f'
- M-f, After pressing Esc key, press 'f'
- c-g, Operation interruption
- c-x u, Undo operation(Undo)
/var/lib/gems/2.3.0/gems/my_help-0.8.0/lib/my_help/my_help_controll.rb:33:in
'show_item': undefined method
[]' for nil:NilClass (NoMethodError)
from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:16:inlist' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/command.rb:27:in
run'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:ininvoke_command' from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor.rb:387:in
dispatch'
from /var/lib/gems/2.3.0/gems/thor-0.20.3/lib/thor/base.rb:466:instart' from /var/lib/gems/2.3.0/gems/my_help-0.8.0/exe/my_help:52:in
<top (required)>'
from /usr/local/bin/my_help:22:inload' from /usr/local/bin/my_help:22:in
my_help list emacs -f では正しく出力結果が表示されるが、
my_help list emacs file では途中までは表示されるが、エラーが起きる。
$ ls [/var/tmp/my_help]
doc/ Gemfile lib/ my_help.gemspec README_en.org README.org spec/
exe/ Gemfile.lock LICENSE.txt Rakefile README.html README.rdoc test/
$ rake install:local
rake aborted!
LoadError: cannot load such file -- bundler/gem_tasks
/home/ryota/doc/lab/multi-scale/my_help/Rakefile:1:in `<top (required)>'
(See full trace by running task with --trace)
$ rake install:local --trace
rake aborted!
'
LoadError: cannot load such file -- bundler/gem_tasks
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
require'
/home/ryota/doc/lab/multi-scale/my_help/Rakefile:1:in<top (required)>' /usr/lib/ruby/vendor_ruby/rake/rake_module.rb:28:in
load'
/usr/lib/ruby/vendor_ruby/rake/rake_module.rb:28:inload_rakefile' /usr/lib/ruby/vendor_ruby/rake/application.rb:689:in
raw_load_rakefile'
/usr/lib/ruby/vendor_ruby/rake/application.rb:94:inblock in load_rakefile' /usr/lib/ruby/vendor_ruby/rake/application.rb:176:in
standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:93:inload_rakefile' /usr/lib/ruby/vendor_ruby/rake/application.rb:77:in
block in run'
/usr/lib/ruby/vendor_ruby/rake/application.rb:176:instandard_exception_handling' /usr/lib/ruby/vendor_ruby/rake/application.rb:75:in
run'
/usr/bin/rake:27:in `
必要な bundler がない。
bundler を入れたら動く?
os: Debian GNU/Linux 10
ruby: 2.5.5
gem: 2.7.6.2
shell: zsh 5.7.1 (x86_64-debian-linux-gnu)
nitta@white:~/% my_help search 10
Traceback (most recent call last):
7: from /home/nitta/.gems/bin/my_help:23:in `<main>'
6: from /home/nitta/.gems/bin/my_help:23:in `load'
5: from /home/nitta/.gems/gems/my_help-0.8.0/exe/my_help:52:in `<top (required)>'
4: from /home/nitta/.gems/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
3: from /home/nitta/.gems/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2: from /home/nitta/.gems/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
1: from /home/nitta/.gems/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/home/nitta/.gems/gems/my_help-0.8.0/exe/my_help:48:in `search': undefined method `search_help' for #<MyHelp::Control:0x0000560516973968> (NoMethodError)
環境
OS: macOS 10.14.6
ruby: 2.6.0
gem: 3.0.1
install 成功
Bug
my_help search
が動かない。
undefined method `search_help' for #<MyHelp::Control:0x00007fbd9a8f95f8> (NoMethodError)
Windows 10 Pro,cygwin
setenv http_proxy http://proxy.kwansei.ac.jp:8080; setenv https_proxy http://proxy.kwansei.ac.jp:8080
を実行すると,
-bash: setenv: コマンドが見つかりません
となったので
export http_proxy=http://proxy.kwansei.ac.jp:8080
を代わりにすると,my_helpをインストールできたが,
Successfully installed my_help-0.8.0
となり,0.8.0がインストールされた.
my_helpを実行したところ,
Commands:
1 [main] ruby 11980 child_info_fork::abort: address space needed by 'transdb.so' (0x2770000) is already occupied...
とよく分からない文が出てきたが,その原因はrubyのバージョンが古いもの(ruby 1.9.3p327 (2012-11-10 revision 37606))だからと考えられる.
Gemfileにtest-unitが入っていないので, 以下のようにテストが失敗する.
$ bundle exec rspec test_my_help.rb
An error occurred while loading ./test_my_help.rb.
Failure/Error: require 'test/unit'
LoadError:
cannot load such file -- test/unit
# ./test_helper.rb:2:in `require'
# ./test_helper.rb:2:in `<top (required)>'
# ./test_my_help.rb:2:in `require'
# ./test_my_help.rb:2:in `<top (required)>'
No examples found.
Finished in 0.00004 seconds (files took 0.08923 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.