-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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's much easier to get the project setup and going on Linux than Windows. If you're on Windows, grab a Linux VM for VMWare Player or Virtual Box and follow the instructions below. If you're on a Mac, view revised guide here.
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 have git 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
Install ruby (2.6.x) and gem. You can either download them and compile manually or install via your OS' package manager (e.g. homebrew for Mac OS X or apt for Ubuntu). We recommend using rvm or rbenv. You will also need MySQL or Postgres, both of which can also be installed via your package manager.
Now that we have gem installed, we can install rake, the ruby build utility, and bundler, the ruby gem dependency manager. You shouldn't need to do this step if you're using rvm or rbenv.
gem install rake bundler
As mentioned, bundler helps to manage dependencies. Verify you are in the cloned huginn
directory. Run bundle
to install Huginn's dependencies.
bundle
If you receive an error like the one below, you have failed to install the mysql2 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.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
You must install the proper dependencies for mysql2. One of the following commands will install them on Ubuntu (not all commands will run/find a package):
apt-get install libmysqlclient-dev
apt-get install mysql-devel
Once you have installed the dependencies, you can install mysql2 individually via gem install mysql2
. After it installs, re-run bundle
.
Install mysql-server and start it up (apt-get
will automatically start the process).
apt-get install mysql-server
From here on, the Getting Started section of the README should be able to guide you.