install thingspeak on ubunto 16.04 | Installation | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
install thingspeak on ubunto 16.04
No permission to create posts
July 29, 2016
3:29 am
Avatar
tceel

Silver
Members
Forum Posts: 12
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

Hi Guys

Excuse me for my English.

I'm a newbie to linux and I tried to install Thingspeak API on Ubuntu 16.04 according to github i must install ruby 2.1.4 but when I do that I got this error when install rails

activesupport requires Ruby version >= 2.2.2.

So i tried to install ruby 2.2.2 and with that rails installation is successful

tceel@tceel:~/ruby-2.2.2$ cd ..
tceel@tceel:~$ echo "gem: --no-rdoc --no-ri" >> ${HOME}/.gemrc
tceel@tceel:~$ sudo gem install rails
Successfully installed rails-5.0.0
1 gem installed
And now when I want to install thingspeak I got this error:

tceel@tceel:~$ cd thingspeak
tceel@tceel:~/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 ZenTest 4.11.0
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 sass 3.2.19
Using thor 0.19.1
Using coffee-script-source 1.8.0
Using execjs 2.2.1
Using activerecord-deprecated_finders 1.0.3
Using arel 4.0.2
Using bundler 1.12.5
Using hike 1.2.3
Using tilt 1.4.1
Using addressable 2.3.6
Using bcrypt 3.1.7
Using buftok 0.2.0
Using highline 1.6.21
Using net-ssh 2.9.1
Using chronic 0.10.2
Using cookiejar 0.3.2
Using daemons 1.1.9
Using dalli 2.7.2
Using database_cleaner 1.2.0
Using orm_adapter 0.5.0
Using diff-lcs 1.2.5
Using dynamic_form 1.1.4
Using json 1.8.1
Using thread 0.1.4
Installing eventmachine 1.0.3 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby -r ./siteconf20160729-27363-130d3fj.rb extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for inotify_init() in sys/inotify.h... yes
.

.

.

compiling kb.cpp
compiling em.cpp
em.cpp: In member function ‘void EventMachine_t::_RunEpollOnce()’:
em.cpp:574:37: error: ‘rb_thread_select’ was not declared in this scope
   EmSelect (0, NULL, NULL, NULL, &tv);
                                     ^
em.cpp: In member function ‘int SelectData_t::_Select()’:
em.cpp:827:67: error: ‘rb_thread_select’ was not declared in this scope
  return EmSelect (maxsocket+1, &fdreads, &fdwrites, &fderrors, &tv);
                                                                   ^
em.cpp: In member function ‘void EventMachine_t::_RunSelectOnce()’:
em.cpp:946:40: error: ‘rb_thread_select’ was not declared in this scope
      EmSelect (0, NULL, NULL, NULL, &tv);
                                        ^
Makefile:229: recipe for target 'em.o' failed
make: *** [em.o] Error 1

make failed, exit code 2

Gem files will remain installed in /tmp/bundler20160729-27363-z2ysnweventmachine-1.0.3/gems/eventmachine-1.0.3 for inspection.
Results logged to /tmp/bundler20160729-27363-z2ysnweventmachine-1.0.3/extensions/x86-linux/2.2.0-static/eventmachine-1.0.3/gem_make.out
Using http_parser.rb 0.6.0
Using simple_oauth 0.2.0
Using equalizer 0.0.9
Using multipart-post 2.0.0
Using gravatarify 3.1.1
Using slop 3.6.0
Using tins 1.3.3
Using terminal-table 1.4.5
Using rspec-core 2.14.8
Using rspec-mocks 2.14.6
Using kgio 2.9.2
Using libv8 3.16.14.7
Using mini_portile 0.6.0
Using mono_logger 1.1.0
Using mysql2 0.3.16
Using naught 1.0.0
Using nested_form 0.3.2
Using newrelic_rpm 3.9.5.251
Using non-stupid-digest-assets 1.0.4
Using oauth 0.4.7
Using redis 3.1.0
Using ref 1.0.5
Using simplificator-rwebthumb 0.3.4 from git://github.com/simplificator/rwebthumb.git (at master@dbd96a6)
Using spork 0.9.2
Using sqlite3 1.3.9
Using will_paginate 3.0.7
Using autotest 4.4.6
Using autotest-rails 4.2.1
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 tzinfo-data 1.2013.8
Using rack-test 0.6.2
Using warden 1.2.3
Using puma 2.9.1
Using rack-protection 1.5.3
Using rack-utf8_sanitizer 1.2.2
Using vegas 0.1.11
Using treetop 1.4.15
Using bourbon 3.2.3
Using coffee-script 2.3.0
Using sprockets 2.11.0
Using net-scp 1.2.1
Using net-sftp 2.1.2
Using net-ssh-gateway 1.2.0
Using rspec-expectations 2.14.5
Using uglifier 2.5.3
Using easy_translate 0.5.0

An error occurred while installing eventmachine (1.0.3), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling.
tceel@tceel:~/thingspeak$

YellYellYell

Please HELP

July 29, 2016
8:40 am
Avatar
tceel

Silver
Members
Forum Posts: 12
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

I'm WAITING for your REPLY

Please help me

How i can get rid of this error:   Yell

An error occurred while installing eventmachine (1.0.3), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling.

August 1, 2016
12:05 am
Avatar
rw950431

Top
Members
Forum Posts: 261
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

It appears that this version of eventmachine has a problems  see https://github.com/eventmachine/eventmachine/issues/509

Particularly this:-

@mindaslab this error seems to be from eventmachine 1.0.3, which might be defined in your bundle (Gemfile / Gemfile.lock). From skimming this ticket, I think 1.0.3 is known to not work, and 1.0.4+ appears to fix this.

Did you try updating to a more recent version (at the time of writing 1.0.7 is the current version)? If you are using bundler, you can try

bundle update eventmachine

which will only change eventmachine (and, if neccessary, its dependencies).

August 1, 2016
1:19 pm
Avatar
tceel

Silver
Members
Forum Posts: 12
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

Thank you rw950431 that error was solved but unfortunately another error has been occurred

Now for "

rake db:create

" I got this error: Yell

tceel@tceel:~/thingspeak$ rake db:create
rake aborted!
Gem::LoadError: You have already activated rake 10.4.2, but your Gemfile requires rake 10.3.2. Prepending `bundle exec` to your command may solve this.
/home/tceel/thingspeak/config/boot.rb:8:in `<top (required)>'
/home/tceel/thingspeak/config/application.rb:1:in `<top (required)>'
/home/tceel/thingspeak/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
tceel@tceel:~/thingspeak$

And when I use "bundle exec rake db:create" I got another error:  YellYell

tceel@tceel:~/thingspeak$ bundle exec rake db:create
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.0.5/lib/active_support/values/time_zone.rb:283: warning: circular argument reference - now
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'mysql2'.
Gem Load Error is: uninitialized constant Mysql2::Client::SECURE_CONNECTION
Backtrace for gem load error is:
/usr/local/lib/ruby/gems/2.2.0/gems/mysql2-0.3.16/lib/mysql2/client.rb:12:in `<class:Client>'
/usr/local/lib/ruby/gems/2.2.0/gems/mysql2-0.3.16/lib/mysql2/client.rb:2:in `<module:Mysql2>'
/usr/local/lib/ruby/gems/2.2.0/gems/mysql2-0.3.16/lib/mysql2/client.rb:1:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/mysql2-0.3.16/lib/mysql2.rb:10:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/mysql2-0.3.16/lib/mysql2.rb:10:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
/home/tceel/thingspeak/config/application.rb:5:in `<top (required)>'
/home/tceel/thingspeak/Rakefile:4:in `require'
/home/tceel/thingspeak/Rakefile:4:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load'
/usr/local/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/usr/local/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:687:in `raw_load_rakefile'
/usr/local/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:94:in `block in load_rakefile'
/usr/local/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:93:in `load_rakefile'
/usr/local/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:77:in `block in run'
/usr/local/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.2.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/usr/local/bin/rake:33:in `<top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Bundler Error Backtrace:
/home/tceel/thingspeak/config/application.rb:5:in `<top (required)>'
/home/tceel/thingspeak/Rakefile:4:in `require'
/home/tceel/thingspeak/Rakefile:4:in `<top (required)>'
NameError: uninitialized constant Mysql2::Client::SECURE_CONNECTION
/home/tceel/thingspeak/config/application.rb:5:in `<top (required)>'
/home/tceel/thingspeak/Rakefile:4:in `require'
/home/tceel/thingspeak/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
tceel@tceel:~/thingspeak$

Please HELP ME AgainSmileSmileSmile

August 2, 2016
1:01 am
Avatar
rw950431

Top
Members
Forum Posts: 261
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline
August 3, 2016
12:54 am
Avatar
tceel

Silver
Members
Forum Posts: 12
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

Dear friend I saw that thread before BUT it doesn't help me.

Still get this error:

tceel@tceel:~/thingspeak$ rake db:create
/usr/local/lib/ruby/gems/2.2.0/gems/activesupport-4.0.5/lib/active_support/values/time_zone.rb:283: warning: circular argument reference - now
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'mysql2'.
Gem Load Error is: uninitialized constant Mysql2::Client::SECURE_CONNECTION

Backtrace for gem load error is:

.

.

.

GETTING CRAZYYellYellYellYell

August 3, 2016
2:01 am
Avatar
rw950431

Top
Members
Forum Posts: 261
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

Search the internet for the error message, someone's probably had the same problem.

August 4, 2016
12:21 am
Avatar
Vinod

MathWorks
Members
Forum Posts: 200
Member Since:
May 1, 2016
sp_UserOfflineSmall Offline

If you're a newbie, or even an experienced developer, I would recommend you use http://www.thingspeak.com .

You do not need to install your local instance of the code to use http://www.thingspeak.com .

August 4, 2016
3:29 am
Avatar
tceel

Silver
Members
Forum Posts: 12
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

Dear rw950431 I searched the web but without any success! 

Dear Vinod thank you for your reply But I need a standalone server that I can host it on a dedicated domain.

Is there someone here to help me to FIX this error?

Any suggestion can be appreciated.

August 4, 2016
5:49 am
Avatar
ambre00fr
New Member
Members
Forum Posts: 1
Member Since:
August 4, 2016
sp_UserOfflineSmall Offline

I'm trying the same thing...

My last attempt is via https://gorails.com/setup/ubuntu/16.04 tutorial, but haven't finished yet.

I'll continue tomorrow

August 4, 2016
8:00 pm
Avatar
rw950431

Top
Members
Forum Posts: 261
Member Since:
January 30, 2014
sp_UserOfflineSmall Offline

Perhaps this ? https://github.com/brianmario/mysql2/issues/603

Seems you need just the right combination of versions of rails and mysql2 gem.

August 5, 2016
4:24 am
Avatar
tceel

Silver
Members
Forum Posts: 12
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

Dear rw950431 thank you again for your help.

My rails version is 4.2.6 and I set up MySQL  version 5.7.13 with :

sudo apt-get install mysql-server mysql-client libmysqlclient-dev

But still get the same error.

When i run this command:

~$ mysql -v

I got this!!!

ERROR 1045 (28000): Access denied for user 'tceel'@'localhost' (using password: NO)

Could this be associated with the error that I've got?

That error make me crazy but fortunately I don't lose my HOPELaugh

Dear ambre00fr tell me about your installation process.Do you proceed it successfully?

August 7, 2016
4:46 am
Avatar
tceel

Silver
Members
Forum Posts: 12
Member Since:
June 21, 2016
sp_UserOfflineSmall Offline

UP...

August 26, 2016
3:35 am
Avatar
zaphod_beeblebrox

Silver
Members
Forum Posts: 5
Member Since:
July 25, 2016
sp_UserOfflineSmall Offline

Hello Guys,

I would also appreciate a tutorial or even a statement that "it works with 16.04". I've been working on this since a week or so but can't get it running. 

Current issues: 

/usr/src/thingspeak # bundle exec rake db:create
/usr/local/rvm/gems/ruby-2.1.0@thingspeak/gems/activesupport-4.0.5/lib/active_support/values/time_zone.rb:283: warning: circular argument reference - now
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'resque_scheduler'.
MultiJson::AdapterError: Did not recognize your adapter specification (incompatible library version - /usr/local/rvm/gems/ruby-2.1.0@thingspeak/gems/json-1.8.1/lib/json/ext/parser.so).
LoadError: incompatible library version - /usr/local/rvm/gems/ruby-2.1.0@thingspeak/gems/json-1.8.1/lib/json/ext/parser.so
(See full trace by running task with --trace)

 

and:

/usr/src/thingspeak # rails server webrick
/usr/local/rvm/gems/ruby-2.1.0@thingspeak/gems/activesupport-4.0.5/lib/active_support/values/time_zone.rb:283: warning: circular argument reference - now
/usr/lib/ruby/vendor_ruby/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'resque_scheduler'. (Bundler::GemRequireError)
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `each'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `block in require'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `each'
from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `require'
from /usr/lib/ruby/vendor_ruby/bundler.rb:99:in `require'
from /usr/src/thingspeak/config/application.rb:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.0@thingspeak/gems/railties-4.0.5/lib/rails/commands.rb:74:in `require'
from /usr/local/rvm/gems/ruby-2.1.0@thingspeak/gems/railties-4.0.5/lib/rails/commands.rb:74:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-2.1.0@thingspeak/gems/railties-4.0.5/lib/rails/commands.rb:71:in `tap'
from /usr/local/rvm/gems/ruby-2.1.0@thingspeak/gems/railties-4.0.5/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

 

To be honest: I only need the REST Api. All the visualization stuff is done be another web application I developed. But the functionality of the API is very useful for me and it does a very good work (creation of channels, etc.).

 

Thanks & best,

Matthias

August 26, 2016
10:08 am
Avatar
zaphod_beeblebrox

Silver
Members
Forum Posts: 5
Member Since:
July 25, 2016
sp_UserOfflineSmall Offline

After some real pita config stuff I managed to get it running on 16.04 with the newest gems. My last issue is the access from the internet. I can only connect from localhost. I don't know how to change this. 

 

~/thingspeak$ rails server webrick
=> Booting WEBrick
=> Rails 4.2.7.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-08-26 14:06:01] INFO WEBrick 1.3.1
[2016-08-26 14:06:01] INFO ruby 2.3.1 (2016-04-26) [x86_64-linux-gnu]
[2016-08-26 14:06:01] INFO WEBrick::HTTPServer#start: pid=15374 port=3000

Netstat:

$ netstat -l
 Active Internet connections (only servers)
 Proto Recv-Q Send-Q Local Address Foreign Address State
 tcp 0 0 localhost:mysql *:* LISTEN
 tcp 0 0 *:ssh *:* LISTEN
 tcp 0 0 localhost:3000 *:* LISTEN
 tcp6 0 0 [::]:http [::]:* LISTEN
 tcp6 0 0 [::]:ssh [::]:* LISTEN
 udp 0 0 *:bootpc *:*

 

The installation was done on an Amazon EC2-Instance. Therefore the internal eth0 IP is different from the Internet IP. May this cause the issue?

 

Helpfull stuff:

https://gist.github.com/MarconiLab/f9f49cc473fa78ecfa72
https://github.com/iobridge/thingspeak/issues/43

 

Best,

Matthias

August 26, 2016
10:29 am
Avatar
zaphod_beeblebrox

Silver
Members
Forum Posts: 5
Member Since:
July 25, 2016
sp_UserOfflineSmall Offline

I've changed from webrick to puma. Now I can connect. 

~/thingspeak$ bundle exec puma
Puma starting in single mode...
* Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://0.0.0.0:9292

 

Mabee this helps someone else...

 

Best,

Matthias

August 26, 2016
12:15 pm
Avatar
zaphod_beeblebrox

Silver
Members
Forum Posts: 5
Member Since:
July 25, 2016
sp_UserOfflineSmall Offline

Dudes, I don't get it working...

Check yourself: http://ec2-52-29-129-34.eu-central-1.compute.amazonaws.com:9292/

Static pages work fine

http://ec2-52-29-129-34.eu-central-1.compute.amazonaws.com:9292/docs

 

but when it comes to some interaction... FAIL...

http://ec2-52-29-129-34.eu-central-1.compute.amazonaws.com:9292/users/sign_up

 

Maybe someone experienced in Ruby stuff knows what to do. I don't 🙁

August 30, 2016
12:43 pm
Avatar
zaphod_beeblebrox

Silver
Members
Forum Posts: 5
Member Since:
July 25, 2016
sp_UserOfflineSmall Offline

Can anybody help or at least comment please :-/

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
13 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

celinabw2, FitoSprayscroma, LunnonGor, lancevl16, bernicenk60, veronicadq18

Administrators: Hans: 387, lee: 457