How to install Dashing dashboard framework (Dashing.io) in 5 minutes. Fixing ruby, bundle, compile and other issues

By admin, written on March 11, 2016

howto

  • Join date: 11-30-99
  • Posts: 52
View Counter:
  • 0 views
Rate it
Ad
Poll
  • Virtualized OS can be used for?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext

Installing Dashing easy way didn’t work for me. For each described step i needed to find out 5 manual fixes. Here is how it worked for me, and description of problems i have fixed

Woks for:

✔ Linux RHEL 7

Should also work for:

✔ Most other current Linux version. But some commands will be differ slightly

In short :
We will install dashing and also rvm and nodejs along bundler gem. This how-to has no intention to provide you with good production ready system. It is just to have you up and running in 5 minutes. If you just need steps and no talking, next chapter is how it worked for me.
For explained steps, read steps from 1.

0

for impatient, aio

$ curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
$ \curl -sSL https://get.rvm.io | bash -s stable
$ rvm install ruby-2.2.1 
$ ruby --version
$ gem install dashing
$ gem install bundler
$ curl --silent --location https://rpm.nodesource.com/setup | bash -
$ yum -y install nodejs 
$ dashing new sweet_dashboard_project
$ cd sweet_dashboard_project
$ bundle
$ dashing start -p 80

check http://YOUR_HOST:80

1

install rvm

This will allow to get proper ruby version in no time.

Like here :
https://rvm.io/

$ curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
$ \curl -sSL https://get.rvm.io | bash -s stable

2

install ruby 2.2.1

$ rvm install ruby-2.2.1 
$ ruby --version
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]

2

install dashing

$ gem install dashing

3

Get bundler

Bundler is needed for Dashing setup

$ gem install bundler

4

Install node.js

$ curl --silent --location https://rpm.nodesource.com/setup | bash -
$ yum -y install nodejs 

5

Setup basic example Dashing project

$ dashing new sweet_dashboard_project
$ cd sweet_dashboard_project
$ bundle

6

Run it, browse it

I used port 80 because firewalls use to block everything but some standard port.
If you run dahing without ports, it will listen on 3030, just skip -p option.

$ dashing start -p 80

In your browser, check
http://YOUR_HOST:80 (or http://YOUR_HOST:3030), whichever you used

7

Problem descriptions

7.1

Compilation with $gem install dashing fails

In my case it was ” eventmachine ” which always failed. I solved it by just updating my ruby version to 2.2.1. I also recommend you try to change your ruby version if this step fails, otherwise you might end up fixing 1000+ compile issues.

Anyways, in case you search for this problem fix, here is how my compile issue looked like :

$ cat /usr/local/share/gems/gems/eventmachine-1.0.9.1/ext/mkmf.log

"gcc -o conftest -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I.    -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC conftest.c  -L. -L/usr/lib64 -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic  -m64   -lruby  -lpthread -lrt -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */


$ cat /usr/local/share/gems/gems/eventmachine-1.0.9.1/ext/gem_make.out
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib64
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby
        --with-ssl-dir
        --without-ssl-dir
        --with-ssl-include
        --without-ssl-include=${ssl-dir}/include
        --with-ssl-lib
        --without-ssl-lib=${ssl-dir}/
        --with-openssl-config
        --without-openssl-config
        --with-pkg-config
        --without-pkg-config
/usr/share/ruby/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
        from /usr/share/ruby/mkmf.rb:519:in `try_link0'
        from /usr/share/ruby/mkmf.rb:534:in `try_link'
        from /usr/share/ruby/mkmf.rb:620:in `block in try_ldflags'
        from /usr/share/ruby/mkmf.rb:613:in `with_ldflags'
        from /usr/share/ruby/mkmf.rb:619:in `try_ldflags'
        from /usr/share/ruby/mkmf.rb:1725:in `pkg_config'
        from extconf.rb:65:in `pkg_config_wrapper'
        from extconf.rb:92:in `<main>'

7.2

-bash: bundle: command not found

just install bundler, rvm seems to miss it right after ruby install

$ gem install bundler

7.3

`autodetect’: Could not find a JavaScript runtime

This error below fixed by installing node.js

$ dashing start
/usr/local/rvm/gems/ruby-2.2.1@global/gems/execjs-2.0.2/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

Have fun!

Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: 0 (from 0 votes)
0 votes 'YES'  0 votes 'NO'

LEARN MORE (amazon bookstore)

TAGS

SOCIAL
Be Sociable, Share!

INCOMING SEARCH TERMS


Leave a Reply