Developing gems and testing

后端 未结 4 2011
野的像风
野的像风 2021-01-31 17:45

I am new to developing Ruby gems, but I thought I\'d give it a try.

Recently checking out the latest episode on Railscasts (http://railscasts.com/episodes/245-new-gem-wi

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-31 18:36

    You can include these lines in your Rakefile:

    task :console do
      exec "irb -r mygem -I ./lib"
    end
    

    This will create a rake task to initialize a new irb session and preload your library. Now, all you have to do is:

    $ rake console
    

提交回复
热议问题