Skip to content

Instantly share code, notes, and snippets.

@fragolinux
Last active November 5, 2017 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fragolinux/a09a5ab762f6c2c44f603ac263de9639 to your computer and use it in GitHub Desktop.
Save fragolinux/a09a5ab762f6c2c44f603ac263de9639 to your computer and use it in GitHub Desktop.
# Steps to install ThingSpeak server on Raspbian Jessie, based on info taken from, in no particular order:
# https://gist.github.com/blacktm/8302741
# https://gist.github.com/sourceperl/b84ab0d723bda21321fc/
# https://github.com/iobridge/thingspeak
# http://www.esp8266-projects.com/2015/11/raspberry-pi2-thingspeak-on-jessie.html
# http://www.esp8266-projects.com/2015/05/raspberry-pi-standalone-thingspeak.html
# http://www.cnx-software.com/2016/12/07/how-to-install-thingspeak-in-ubuntu-16-04/
# install requirements
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential git mysql-server mysql-client libmysqlclient-dev libxml2-dev libxslt-dev libssl-dev libsqlite3-dev autoconf bison libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
# if you missed the root password creation on previous step, use this to give mysql root user a password
# sudo dpkg-reconfigure mysql-server-5.5
# insert password from previous step at the mysql prompt when asked:
mysql -uroot mysql -p <<EOF
CREATE DATABASE `thingspeak_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
GRANT ALL PRIVILEGES ON `thingspeak_test`.* TO 'thing'@'localhost';
FLUSH PRIVILEGES;
COMMIT;
EXIT;
EOF
# download, compile and install ruby from sources (it's not latest available version, but couldn't get latest to work)
cd
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.9.tar.gz
tar xvzf ruby-2.1.9.tar.gz
cd ruby-2.1.9/
./configure
make
sudo make install
# install rails
cd ..
echo "gem: --no-rdoc --no-ri" >> ${HOME}/.gemrc
sudo gem install activesupport --no-rdoc --no-ri -v 4.2.6
sudo gem install rails --no-rdoc --no-ri -v 4.2.6
sudo gem install bundle --no-rdoc --no-ri
# install ThingSpeak
git clone https://github.com/iobridge/thingspeak.git
cp thingspeak/config/database.yml.example thingspeak/config/database.yml
cd thingspeak/
bundle install
bundle exec rake db:create
bundle exec rake db:schema:load
# start ThingSpeak Server
rails server webrick
# open browser on http://raspberry-ip:3000 and follow instruction on final part of: http://www.esp8266-projects.com/2015/05/raspberry-pi-standalone-thingspeak.html
# I had problems with the incomplete italian translation, after stopping the rails server I get rid of it with:
# mv $HOME/thingspeak/config/locales/it.yml $HOME/thingspeak/config/locales/it.yml.bak
# update: no, latest problems still exists... lot of wrong html in pages, to get rid of the errors I had to set browser default language to ENGLISH (EN)
@pako10000
Copy link

pako10000 commented May 9, 2017

Hi

I also want to install Thingspeak on my raspberry pi and I did as you described. Everything works fine till i come to the Thingspeak installation there I get:

Using treetop 1.4.15
Using sprockets 2.11.0
Using twitter_oauth 0.4.94 from git://github.com/moomerman/twitter_oauth.git (at master@7124305)
Using therubyracer 0.12.1
Using will_paginate-bootstrap 1.0.1
Using nokogiri 1.6.3.1
Using redis-namespace 1.5.1
Using em-socksify 0.3.0
Using http 0.6.2
Using em-twitter 0.3.3
Using faraday 0.9.0
Using net-scp 1.2.1
Using net-sftp 2.1.2
Using net-ssh-gateway 1.2.0
Using bourbon 3.2.3
Using coffee-script 2.3.0
Using uglifier 2.5.3
Downloading tzinfo-data-1.2013.8 revealed dependencies not in the API or the
lockfile (tzinfo (>= 1.0.0)).
Either installing with --full-index or running bundle update tzinfo-data should
fix the problem.
pi@raspberrypi:~/thingspeak $

Doing it as mentioned here: bundle update tzinfo-data leads to:

Fetching gem metadata from http://rubygems.org/............
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Resolving dependencies.................
Bundler could not find compatible versions for gem "tzinfo":
In snapshot (Gemfile.lock):
tzinfo (= 0.3.41)

In Gemfile:
i18n-tasks (> 0.5.4) was resolved to 0.5.4, which depends on
activesupport was resolved to 4.0.5, which depends on
tzinfo (
> 0.3.37)

tzinfo-data was resolved to 1.2013.3, which depends on
  tzinfo (>= 1.0.0)

Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
pi@raspberrypi:~/thingspeak $

if I do bundle update then:

pi@raspberrypi:~/thingspeak $ bundle update
The git source git://github.com/moomerman/twitter_oauth.git uses the git protocol, which transmits data without encryption. Disable this warning with bundle config git.allow_insecure true, or switch to the https protocol to keep your data secure.
The git source git://github.com/simplificator/rwebthumb.git uses the git protocol, which transmits data without encryption. Disable this warning with bundle config git.allow_insecure true, or switch to the https protocol to keep your data secure.
The git source git://github.com/gregbell/active_admin.git uses the git protocol, which transmits data without encryption. Disable this warning with bundle config git.allow_insecure true, or switch to the https protocol to keep your data secure.
Fetching git://github.com/moomerman/twitter_oauth.git
Fetching git://github.com/simplificator/rwebthumb.git
Fetching git://github.com/gregbell/active_admin.git
Fetching gem metadata from http://rubygems.org/.............
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Resolving dependencies.........
Bundler could not find compatible versions for gem "railties":
In Gemfile:
activeadmin was resolved to 1.0.0, which depends on
railties (< 5.2, >= 4.2)

rails (= 4.0.5) was resolved to 4.0.5, which depends on
  railties (= 4.0.5)

pi@raspberrypi:~/thingspeak $

Do you have any idea how to solve that.

Many thanks

Best Regards Patrick

@fadonoso
Copy link

fadonoso commented Jun 5, 2017

Hi,

in order to solve this: ¨Downloading tzinfo-data-1.2013.8 revealed dependencies not in the API or the
lockfile (tzinfo (>= 1.0.0)).¨

update the tzinfo-data in Gemfile.lock to the newest version. In mi case:

tzinfo-data (1.2017.2)

That worked for me.

Good luck!!

@rainfrost99
Copy link

rainfrost99 commented Jun 22, 2017

Hi fadonoso and all,
i'm also having issues performing [bundle install].

ubuntu@ip:~/thingspeak$ bundle update
Fetching git://github.com/moomerman/twitter_oauth.git
Fetching git://github.com/simplificator/rwebthumb.git
Fetching git://github.com/gregbell/active_admin.git
Fetching gem metadata from http://rubygems.org/............
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    activeadmin was resolved to 1.0.0, which depends on
      railties (< 5.2, >= 4.2)

    rails (= 4.0.5) was resolved to 4.0.5, which depends on
      railties (= 4.0.5)

After performing the recommended remedy using [bundle update tzinfo-data] and changing to tzinfo-data (1.2017.2), i'm still receiving the same error:

ubuntu@ip:~/thingspeak$ bundle install
Fetching gem metadata from http://rubygems.org/............
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Using rake 10.3.2
Using i18n 0.6.11
Using minitest 4.7.5
Using multi_json 1.10.1
Using thread_safe 0.3.4
Using tzinfo 0.3.41
Using builder 3.1.4
Using erubis 2.7.0
Using rack 1.5.2
Using mime-types 1.25.1
Using polyglot 0.3.5
Using activerecord-deprecated_finders 1.0.3
Using arel 4.0.2
Using thor 0.19.1
Using hike 1.2.3
Using tilt 1.4.1
Using bundler 1.15.1
Using mysql2 0.3.16
Using bcrypt 3.1.7
Using orm_adapter 0.5.0
Using json 1.8.1
Using oauth 0.4.7
Using libv8 3.16.14.7 (x86_64-linux)
Using ref 1.0.5
Using nested_form 0.3.2
Using dalli 2.7.2
Using kgio 2.9.2
Using will_paginate 3.0.7
Using mini_portile 0.6.0
Using gravatarify 3.1.1
Using dynamic_form 1.1.4
Using redis 3.1.0
Using mono_logger 1.1.0
Using daemons 1.1.9
Using simplificator-rwebthumb 0.3.4 from git://github.com/simplificator/rwebthumb.git (at master@dbd96a6)
Using addressable 2.3.6
Using cookiejar 0.3.2
Using eventmachine 1.0.3
Using http_parser.rb 0.6.0
Using buftok 0.2.0
Using simple_oauth 0.2.0
Using equalizer 0.0.9
Using multipart-post 2.0.0
Using naught 1.0.0
Using highline 1.6.21
Using net-ssh 2.9.1
Using newrelic_rpm 3.9.5.251
Using sass 3.2.19
Using coffee-script-source 1.8.0
Using execjs 2.2.1
Using chronic 0.10.2
Using non-stupid-digest-assets 1.0.4
Fetching tzinfo-data 1.2017.2
Using thread 0.1.4
Using slop 3.6.0
Using tins 1.3.3
Using terminal-table 1.4.5
Using sqlite3 1.3.9
Using rspec-core 2.14.8
Using diff-lcs 1.2.5
Using rspec-mocks 2.14.6
Using spork 0.9.2
Using ZenTest 4.11.0
Using database_cleaner 1.2.0
Using faker 1.4.3
Using geokit 1.9.0
Using memoizable 0.4.2
Using activesupport 4.0.5
Using rufus-scheduler 2.0.24
Using rack-test 0.6.2
Using warden 1.2.3
Using rack-protection 1.5.3
Using vegas 0.1.11
Using rack-utf8_sanitizer 1.2.2
Using puma 2.9.1
Using treetop 1.4.15
Using sprockets 2.11.0
Using twitter_oauth 0.4.94 from git://github.com/moomerman/twitter_oauth.git (at master@7124305)
Using therubyracer 0.12.1
Using will_paginate-bootstrap 1.0.1
Using nokogiri 1.6.3.1
Using redis-namespace 1.5.1
Using em-socksify 0.3.0
Using http 0.6.2
Using em-twitter 0.3.3
Using faraday 0.9.0
Using net-scp 1.2.1
Using net-sftp 2.1.2
Using net-ssh-gateway 1.2.0
Using bourbon 3.2.3
Using coffee-script 2.3.0
Using uglifier 2.5.3
Downloading tzinfo-data-1.2017.2 revealed dependencies not in the API or the lockfile (tzinfo
(>= 1.0.0)).
Either installing with `--full-index` or running `bundle update tzinfo-data` should fix the
problem.
ubuntu@ip:~/thingspeak$

Do you've any other ideas to remedy this problem itself?

Thank you!

@paiarunk
Copy link

Hi embdev

Are you able to solve the above issues ??
If yes please share the remedy ??

Arun

@bobharris
Copy link

bobharris commented Nov 5, 2017

Hi,

in order to solve this: ¨Downloading tzinfo-data-1.2013.8 revealed dependencies not in the API or the
lockfile (tzinfo (>= 1.0.0)).¨

update the tzinfo-data in Gemfile.lock to the newest version. In mi case:

tzinfo-data (1.2017.2)

That worked for me.

Good luck!!

That worked for me too! HOWEVER,
the version is now 1.2017.3 as of 11/5/2017. Check the tz-info-data github page for current gem version.

and then I got stuck on can't start daemons. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment