Contents
Huginn Agents can now be written as external gems and be added to your Huginn installation with the ADDITIONAL_GEMS environment variable.
Install Ruby
1 2 3 |
sudo apt-add-repository ppa:brightbox/ruby-ng sudo apt-get update sudo apt-get install ruby2.4 ruby2.4-dev |
Update Ruby application’s gems
Pull Huginn
1 2 |
git clone https://github.com/huginn/huginn.git cd ./huginn |
Add ADDITIONAL_GEMS ENV
1 |
echo "ADDITIONAL_GEMS=huginn_readability_agent(git: https://github.com/kreuzwerker/DKT.huginn_readability_agent.git)" >> .env.example |
“huginn_readability_agent” is the name of .gemspec file.
Add Gems
1 2 |
echo "gem 'huginn_readability_agent', github: 'kreuzwerker/DKT.huginn_readability_agent'" >> Gemfile cp .env.example .env && bundle |
After running these commmands, the content of Gemfile.lock file will be automatically updated.
https://raw.githubusercontent.com/yulahuyed/huginn-gems/master/Gemfile.lock-readability
Update Huginn
Fork Huginn to your Github, update three files (.env.example,Gemfile.lock,Gemfile) to Huginn on your Github, and click the installation botton of Heroku.
Tips
If you try to run bin/setup_heroku after following the upper commands, maybe get this error. So just update the three file on Github and click the installation botton of Heroku.
1 2 3 4 5 6 |
/usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- active_support/core_ext/object/blank (LoadError) from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /home/ubuntu/huginn/lib/setup_tools.rb:5:in `<top (required)>' from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' from bin/setup_heroku:2:in `<main>' |