iobridge / thingspeak

ThingSpeak is an open source “Internet of Things” application and API to store and retrieve data from things using HTTP over the Internet or via a Local Area Network. With ThingSpeak, you can create sensor logging applications, location tracking applications, and a social network of things with status updates.
https://thingspeak.com
Other
1.04k stars 331 forks source link

Install on Debian 9 not successful #56

Open franzhartwig opened 5 years ago

franzhartwig commented 5 years ago

I ran:

gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
\curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.1.0
rvm use 2.1.0 --default
git clone https://github.com/iobridge/thingspeak.git

Up to here successful.

cd thingspeak
bundle install

Here I got some errors:```

Bundler could not find compatible versions for gem "jquery-rails": In Gemfile: jquery-rails (= 3.0.4)

activeadmin was resolved to 2.0.0, which depends on
  jquery-rails (~> 4.2)

Bundler could not find compatible versions for gem "ruby": In Gemfile: ruby

nokogiri was resolved to 1.9.1, which depends on
  ruby (>= 2.1.0)

puma was resolved to 3.12.1, which depends on
  ruby (>= 2.2)

rails (= 4.0.5) was resolved to 4.0.5, which depends on
  ruby (>= 1.9.3)

What is the easiest way to repair dependencies and compatibility?

Thank you,

Franz
migraichen commented 5 years ago

Hey,

i run into the same problem on Ubuntu 18.04. You can specify the exact version on the 'Gemfile'.

Can someone please provide these information ? 'bundle show' or 'bundle env' or 'bundle info' should print it.

franzhartwig commented 5 years ago

Actually, my thingspeak server works. I restored an backup with working directories ~/.rvm, ~.gem, ~/.bundle and /opt/thingspeak. Paths to ruby und rails are configured as PATH variable via export in ~/bashrc und ~./profile:

which ruby
/home/username/.rvm/rubies/ruby-2.1.0/bin/ruby
which rails
/home/username/.rvm/gems/ruby-2.1.0@thingspeak/bin/rails

Perhaps you get an error when executing rails server -d: "It seems your ruby installation is missing psych (for YAML output)."

I had to install:

rvm pkg install libyam ## ignore errors ...
rvm reinstall ruby -v 2.1.0 ## needs time, ignore errors ...

Create a file /etc/apt/sources.list.d/package-sid.list: deb http://ftp.de.debian.org/debian sid main

sudo apt update
sudo apt install libmysqlclient-dev

Remove file /etc/apt/sources.list.d/package-sid.list

gem install mysql2 -v 0.3.21
gem pristine --extensions mysql2 --version 0.5.2 mysql2 --version 0.3.21
sudo apt update

Actually, bundler is not installed. My Gemfile:

cat Gemfile
source 'http://rubygems.org'

gem 'rails', '4.0.5'
gem 'jquery-rails', '3.0.4'
gem 'rails_autolink'
gem 'mysql2'
gem 'devise'
gem 'twitter_oauth', git: 'git://github.com/moomerman/twitter_oauth.git'
gem 'therubyracer'
gem 'exception_notification'
gem 'nested_form'
gem 'dalli'
gem 'kgio'
gem 'will_paginate', '~> 3.0.pre2'
gem 'will_paginate-bootstrap'
gem 'nokogiri'
gem 'acts_as_tree'
gem 'acts_as_list'
gem 'gravatarify'
gem 'dynamic_form'
gem 'geokit'
gem 'redis'
gem 'resque-scheduler', '2.3.1', :require => 'resque_scheduler'
gem 'daemons'
#gem 'db2fog' (not compatible with Rails 4, see https://github.com/hakanensari/db2fog for Rails 4 version)
gem 'simplificator-rwebthumb', :git => "git://github.com/simplificator/rwebthumb.git"
gem 'tweetstream'
gem 'capistrano', '~> 2.15.4'
gem 'rack-utf8_sanitizer'
gem 'newrelic_rpm'
gem 'actionpack-xml_parser'
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'chronic'
gem 'non-stupid-digest-assets'
gem 'em-http-request'
gem 'turbolinks'
gem 'geokit-rails'
gem 'clockwork'

# to use debugger
# gem 'ruby-debug'

# assets
gem "sass-rails", "4.0.2"
gem 'coffee-rails', " ~> 4.0"
gem 'uglifier'

group :development do
  gem 'annotate', '~> 2.6.1'
  gem 'quiet_assets'
  gem 'puma'
  gem 'i18n-tasks', '~> 0.5.4'
end

group :test do
  gem 'sqlite3-ruby', '1.3.3', :require => 'sqlite3'
  gem 'rspec-rails', '~> 2.14.1'
  gem 'spork'
  gem 'factory_girl_rails'
  gem 'webrat'
  gem 'faker'
  gem 'json_spec'
  gem 'autotest'
  gem 'autotest-rails'
  gem 'ZenTest'
  gem 'database_cleaner', '~> 1.2.0'
end
migraichen commented 5 years ago

Hey Franz,

thanks for your response. I managed to get it running, too.

I started with: command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - \curl -sSL https://get.rvm.io | bash -s stable

source /home//.rvm/scripts/rvm rvm install 2.1

git clone https://github.com/iobridge/thingspeak cd thinkspeak

bundle install

then i hit the first error

Error: 'ZenTest-4.11.0 requires rubygems version < 3.0, which is incompatible with the current version, 3.0.4'

rvm --force rubygems 2.1.0

solved it then.

bundle install

After that some more Errors occur in the install process they are described here: https://www.cnx-software.com/2016/12/07/how-to-install-thingspeak-in-ubuntu-16-04/