尝试为mailcatcher创建一个rvm包装器,只是带来了rvm包装器的用法。

时间:2019-04-10 14:44:55

标签: ruby-on-rails ruby rubygems rvm mailcatcher

我正在运行MacOS 10.14,并且当我按照此处的说明进行操作时: https://mailcatcher.me/RVM标题下,以便为mailcatcher gem生成RVM包装器,我得到以下输出(出于上下文,我已经添加了一些命令):

~ $ rvm list
   ruby-2.1.3 [ x86_64 ]
   ruby-2.3.1 [ x86_64 ]
=* ruby-2.6.2 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

~ $ rvm gemset list

gemsets for ruby-2.6.2 (found in /Users/stephen/.rvm/gems/ruby-2.6.2)
=> (default)
   global
   pipe_dream-5.2

~ $ rvm default@mailcatcher --create do gem install mailcatcher
Successfully installed mailcatcher-0.7.1
Parsing documentation for mailcatcher-0.7.1
Done installing documentation for mailcatcher after 0 seconds
1 gem installed
~ $ rvm wrapper default@mailcatcher --no-prefix mailcatcher catchmail
Ruby enVironment Manager 1.29.7 (latest) (c) 2009-2017 Michal Papis, Piotr Kuczynski, Wayne E. Seguin

# Wrapper

Show/regenerate wrappers.

NOTE: This command delegates to 'gem wrapper' => <https://github.com/rvm/gem-wrappers>

## Usage

Show paths and generated wrappers:

    rvm wrapper show


Show path to generated wrapper:

    rvm wrapper show executable_name

Where `executable_name` is something like `ruby` or `rake`.


It is also possible to generate a wrapper for external scripts that require ruby:

    rvm wrapper /full/path/to/script

Where `/full/path/to/script` is full path to existing script


Wrappers are generated automatically, but it is possible to rerun the process:

    rvm wrapper regenerate


Documentation:

    rvm wrapper [help]

For additional documentation please visit https://rvm.io

~ $

第一个命令似乎成功执行,因为它成功创建了一个新的“ mailcatcher” gemset:

~ $ rvm gemset list

gemsets for ruby-2.6.2 (found in /Users/stephen/.rvm/gems/ruby-2.6.2)
=> (default)
   global
   mailcatcher
   pipe_dream-5.2

尽管最后一个命令只是打印出rvm wrapper的用法。

运行mailcatcher不起作用,尽管专门切换到gemset可以使它起作用,请参见下文:

~ $ mailcatcher
-bash: mailcatcher: command not found
~ $ rvm gemset use mailcatcher
Using ruby-2.6.2 with gemset mailcatcher
~ $ mailcatcher
Starting MailCatcher
==> smtp://127.0.0.1:1025
/Users/stephen/.rvm/gems/ruby-2.6.2@mailcatcher/gems/thin-1.5.1/lib/thin/server.rb:104: warning: constant ::Fixnum is deprecated
==> http://127.0.0.1:1080/
*** MailCatcher runs as a daemon by default. Go to the web interface to quit.

尽管生成RVM包装器的全部目的是使mailcatcher可以在任何地方运行,而不必专门选择“ mailcatcher” gemset。知道为什么最后一个命令只是打印出rvm wrapper用法,而不是实际创建包装器吗?

0 个答案:

没有答案