Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4k
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.
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
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
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.
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
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
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
.
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>
Installmysql-server and start it up (apt-get
will automatically start the process).
apt-get install mysql-server
From here on, theGetting Started section of theREADME should be able to guide you.