Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Novice setup guide

jtullett edited this pageJan 28, 2025 ·21 revisions

Novice Setup Guide

Written by a Ruby novice for those who are clueless during set up as well. These instructions are for Linux.

Note: It'smuch easier to get the project setup and going on Linux than Windows. If you're on Windows, grab aLinux VM forVMWare Player orVirtual Box and follow the instructions below.If you're on a Mac, view revised guidehere.

There is also a (very verbose)OpenSUSE 13.2 install guide.

Step 1 - Clone the repository

Since you are on GitHub, you have probably done this step a thousand times before.

Verify you havegit installed on your machine, go to a directory where you would like to work, and clone the repository.

git clone git://github.com/huginn/huginn.git

Troubleshooting

If you fail to clone the repository because of environment issue to block git protocol, retry it again after '.gitconfig in your home folder' is changed

[url"https://github.com"]      insteadof = git://github.com

Step 2 - Install ruby and gem

Installruby (2.6.x) andgem. You can either download them and compile manually or install via your OS' package manager (e.g.homebrew for Mac OS X orapt for Ubuntu). We recommend usingrvm orrbenv. You will also need MySQL or Postgres, both of which can also be installed via your package manager.

Step 3 - Install rake and bundler

Now that we havegem installed, we can installrake, the ruby build utility, andbundler, the ruby gem dependency manager. You shouldn't need to do this step if you're using rvm or rbenv.

gem install rake bundler

Step 4 - Install local dependencies

Verify you are in the clonedhuginn directory.

Make a copy of the .env file, otherwise bundle will fail.

cp .env.example .env

As mentioned,bundler helps to manage dependencies. Runbundle to install Huginn's dependencies.

bundle

Troubleshooting

mysql2

If you receive an error like the one below, you have failed to install themysql2 gem. Continue reading after the error message.

Building native extensions.  This could take a while...ERROR:  Error installing mysql2:  ERROR: Failed to build gem native extension.        /usr/bin/ruby1.9.1 extconf.rbchecking for rb_thread_blocking_region()... yeschecking for rb_wait_for_single_fd()... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lm... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lz... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lsocket... nochecking for mysql_query() in -lmysqlclient... nochecking for main() in -lnsl... yeschecking for mysql_query() in -lmysqlclient... nochecking for main() in -lmygcc... nochecking for mysql_query() in -lmysqlclient... no*** extconf.rb failed ***

You must install theproper dependencies formysql2. One of the following commands will install them on Ubuntu (not all commands will run/find a package):

apt-get install libmysqlclient-devapt-get install mysql-devel

Once you have installed the dependencies, you can installmysql2 individually viagem install mysql2. After it installs, re-runbundle.

Step 5 - Create a secret

Create a secret key...

rake secret

...and edit the .env file, pasting the newly generated key into the section near the top

APP_SECRET_TOKEN=<new value here>

Step 6 - Install and start mysql-server

Installmysql-server and start it up (apt-get will automatically start the process).

apt-get install mysql-server

Step 7 - Follow the rest of Quick Start

From here on, theGetting Started section of theREADME should be able to guide you.

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp