Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing on Ubuntu 22.04 LTS fails #202

Open
github6043 opened this issue Feb 15, 2024 · 16 comments
Open

Installing on Ubuntu 22.04 LTS fails #202

github6043 opened this issue Feb 15, 2024 · 16 comments
Labels

Comments

@github6043
Copy link

Hi, any help is appreciated. I'm stuck with this, former Installation was Dashing on Ubuntu 20 LTS, I had to migrate to 22 LTS

Step two does not work 👍

Install bundler

$ gem install bundler

Install smashing

$ gem install smashing

Create a new project

$ smashing new my-project

Change Directory into the project

$ cd my-project

Install the bundle of project specific gems

$ bundle

Start the example dashboard!

$ smashing start

*ERROR: Error installing smashing:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/3.0.0/gems/eventmachine-1.2.7/ext

/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240215-255135-jefh5k.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/3.0.0/gems/eventmachine-1.2.7 for inspection.
Results logged to /var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0/eventmachine-1.2.7/gem_make.out

@github6043 github6043 added the bug label Feb 15, 2024
@github6043
Copy link
Author

sudo gem install smashing
Fetching daemons-1.4.1.gem
Fetching eventmachine-1.2.7.gem
Fetching rack-2.2.8.gem
Fetching thin-1.8.2.gem
Fetching thor-1.3.0.gem
Fetching concurrent-ruby-1.2.3.gem
Fetching sprockets-4.2.1.gem
Fetching tilt-2.3.0.gem
Fetching rack-protection-2.2.4.gem
Fetching ruby2_keywords-0.0.5.gem
Fetching mustermann-2.0.2.gem
Fetching sinatra-2.2.4.gem
Fetching multi_json-1.15.0.gem
Fetching sinatra-contrib-2.2.4.gem
Fetching ffi-1.16.3.gem
Fetching sassc-2.4.0.gem
Fetching raabro-1.4.0.gem
Fetching tzinfo-2.0.6.gem
Fetching et-orbi-1.2.7.gem
Fetching fugit-1.9.0.gem
Fetching rufus-scheduler-3.9.1.gem
Fetching execjs-2.9.1.gem
Fetching coffee-script-source-1.12.2.gem
Fetching coffee-script-2.4.1.gem
Fetching smashing-1.3.6.gem
Successfully installed thor-1.3.0
Successfully installed rack-2.2.8
Building native extensions. This could take a while...
ERROR: Error installing smashing:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/3.0.0/gems/eventmachine-1.2.7/ext

/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240215-27045-ytn75t.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/3.0.0/gems/eventmachine-1.2.7 for inspection.
Results logged to /var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0/eventmachine-1.2.7/gem_make.out

@github6043
Copy link
Author

ruby --version
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]

@kinow
Copy link
Member

kinow commented Feb 15, 2024

Thanks for the issue with detailed information. I have Ubuntu 22.04 LTS too, so I should be able to try to reproduce it and compare environment settings. I'm leaving this GitHub notification in my GH Inbox, and will update it once I have some spare time to test it 👍 Cheers.

@github6043
Copy link
Author

Thanks for the issue with detailed information. I have Ubuntu 22.04 LTS too, so I should be able to try to reproduce it and compare environment settings. I'm leaving this GitHub notification in my GH Inbox, and will update it once I have some spare time to test it 👍 Cheers.

Thanks kinow

@kinow
Copy link
Member

kinow commented Feb 15, 2024

@github6043 reading this now at home,

ERROR: Failed to build gem native extension.

This might fail if as the message says

/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240215-27045-ytn75t.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

Do you have ruby-dev in your Ubuntu? Here's what I have:

kinow@ranma:~$ dpkg -l | grep ruby-dev
ii  ruby-dev:amd64                                 1:3.0~exp1                                    amd64        Header files for compiling extension modules for Ruby (default version)

I also use this laptop I am using to write this message, with Ubuntu LTS to build and upload the gem to RubyGems, so it should work for you as we have a similar environment, except if you don't have the Ruby dev package.

@github6043
Copy link
Author

github6043 commented Feb 15, 2024 via email

@github6043
Copy link
Author

github6043 commented Feb 15, 2024 via email

@github6043
Copy link
Author

github6043 commented Feb 15, 2024 via email

@github6043
Copy link
Author

Installed now, thanks Bruno

  • sudo apt install ruby ruby-dev openssl libssl-dev
  • sudo apt install build-essential libssl-dev
  • sudo gem install bundler
  • sudo gem install smashing

sudo gem install smashing
Fetching daemons-1.4.1.gem
Fetching thin-1.8.2.gem
Fetching concurrent-ruby-1.2.3.gem
Fetching thor-1.3.0.gem
Fetching rack-2.2.8.gem
Fetching eventmachine-1.2.7.gem
Fetching sprockets-4.2.1.gem
Fetching tilt-2.3.0.gem
Fetching rack-protection-2.2.4.gem
Fetching ruby2_keywords-0.0.5.gem
Fetching mustermann-2.0.2.gem
Fetching sinatra-2.2.4.gem
Fetching multi_json-1.15.0.gem
Fetching sinatra-contrib-2.2.4.gem
Fetching ffi-1.16.3.gem
Fetching sassc-2.4.0.gem
Fetching raabro-1.4.0.gem
Fetching tzinfo-2.0.6.gem
Fetching et-orbi-1.2.7.gem
Fetching fugit-1.9.0.gem
Fetching rufus-scheduler-3.9.1.gem
Fetching execjs-2.9.1.gem
Fetching coffee-script-source-1.12.2.gem
Fetching coffee-script-2.4.1.gem
Fetching smashing-1.3.6.gem
Successfully installed thor-1.3.0
Successfully installed rack-2.2.8
Building native extensions. This could take a while...
Successfully installed eventmachine-1.2.7
Successfully installed daemons-1.4.1
Building native extensions. This could take a while...
Successfully installed thin-1.8.2
Successfully installed concurrent-ruby-1.2.3
Successfully installed sprockets-4.2.1
Successfully installed tilt-2.3.0
Successfully installed rack-protection-2.2.4
Successfully installed ruby2_keywords-0.0.5
Successfully installed mustermann-2.0.2
Successfully installed sinatra-2.2.4
Successfully installed multi_json-1.15.0
Successfully installed sinatra-contrib-2.2.4
Building native extensions. This could take a while...
Successfully installed ffi-1.16.3
Building native extensions. This could take a while...
Successfully installed sassc-2.4.0
Successfully installed raabro-1.4.0
Successfully installed tzinfo-2.0.6
Successfully installed et-orbi-1.2.7
Successfully installed fugit-1.9.0
Successfully installed rufus-scheduler-3.9.1
Successfully installed execjs-2.9.1
Successfully installed coffee-script-source-1.12.2
Successfully installed coffee-script-2.4.1
Successfully installed smashing-1.3.6
Parsing documentation for thor-1.3.0
Installing ri documentation for thor-1.3.0
Parsing documentation for rack-2.2.8
Installing ri documentation for rack-2.2.8
Parsing documentation for eventmachine-1.2.7
Installing ri documentation for eventmachine-1.2.7
Parsing documentation for daemons-1.4.1
Installing ri documentation for daemons-1.4.1
Parsing documentation for thin-1.8.2
Installing ri documentation for thin-1.8.2
Parsing documentation for concurrent-ruby-1.2.3
Installing ri documentation for concurrent-ruby-1.2.3
Parsing documentation for sprockets-4.2.1
Installing ri documentation for sprockets-4.2.1
Parsing documentation for tilt-2.3.0
Installing ri documentation for tilt-2.3.0
Parsing documentation for rack-protection-2.2.4
Installing ri documentation for rack-protection-2.2.4
Parsing documentation for ruby2_keywords-0.0.5
Installing ri documentation for ruby2_keywords-0.0.5
Parsing documentation for mustermann-2.0.2
Installing ri documentation for mustermann-2.0.2
Parsing documentation for sinatra-2.2.4
Installing ri documentation for sinatra-2.2.4
Parsing documentation for multi_json-1.15.0
Installing ri documentation for multi_json-1.15.0
Parsing documentation for sinatra-contrib-2.2.4
Installing ri documentation for sinatra-contrib-2.2.4
Parsing documentation for ffi-1.16.3
Installing ri documentation for ffi-1.16.3
Parsing documentation for sassc-2.4.0
Installing ri documentation for sassc-2.4.0
Parsing documentation for raabro-1.4.0
Installing ri documentation for raabro-1.4.0
Parsing documentation for tzinfo-2.0.6
Installing ri documentation for tzinfo-2.0.6
Parsing documentation for et-orbi-1.2.7
Installing ri documentation for et-orbi-1.2.7
Parsing documentation for fugit-1.9.0
Installing ri documentation for fugit-1.9.0
Parsing documentation for rufus-scheduler-3.9.1
Installing ri documentation for rufus-scheduler-3.9.1
Parsing documentation for execjs-2.9.1
Installing ri documentation for execjs-2.9.1
Parsing documentation for coffee-script-source-1.12.2
Installing ri documentation for coffee-script-source-1.12.2
Parsing documentation for coffee-script-2.4.1
Installing ri documentation for coffee-script-2.4.1
Parsing documentation for smashing-1.3.6
Installing ri documentation for smashing-1.3.6
Done installing documentation for thor, rack, eventmachine, daemons, thin, concurrent-ruby, sprockets, tilt, rack-protection, ruby2_keywords, mustermann, sinatra, multi_json, sinatra-contrib, ffi, sassc, raabro, tzinfo, et-orbi, fugit, rufus-scheduler, execjs, coffee-script-source, coffee-script, smashing after 52 seconds
25 gems installed

@github6043
Copy link
Author

Well, close, but not ready yet

smashing new icinga
create icinga
create icinga/.gitignore
create icinga/Gemfile
create icinga/README.md
create icinga/Rakefile
create icinga/assets/fonts/fa-brands-400.eot
create icinga/assets/fonts/fa-brands-400.svg
create icinga/assets/fonts/fa-brands-400.ttf
create icinga/assets/fonts/fa-brands-400.woff
create icinga/assets/fonts/fa-brands-400.woff2
create icinga/assets/fonts/fa-regular-400.eot
create icinga/assets/fonts/fa-regular-400.svg
create icinga/assets/fonts/fa-regular-400.ttf
create icinga/assets/fonts/fa-regular-400.woff
create icinga/assets/fonts/fa-regular-400.woff2
create icinga/assets/fonts/fa-solid-900.eot
create icinga/assets/fonts/fa-solid-900.svg
create icinga/assets/fonts/fa-solid-900.ttf
create icinga/assets/fonts/fa-solid-900.woff
create icinga/assets/fonts/fa-solid-900.woff2
create icinga/assets/images/logo.png
create icinga/assets/javascripts/application.coffee
create icinga/assets/javascripts/d3-3.2.8.js
create icinga/assets/javascripts/dashing.gridster.coffee
create icinga/assets/javascripts/gridster/jquery.gridster.min.js
create icinga/assets/javascripts/gridster/jquery.leanModal.min.js
create icinga/assets/javascripts/jquery.knob.js
create icinga/assets/javascripts/rickshaw-1.4.3.min.js
create icinga/assets/stylesheets/all.css
create icinga/assets/stylesheets/application.scss
create icinga/assets/stylesheets/brands.css
create icinga/assets/stylesheets/jquery.gridster.min.css
create icinga/assets/stylesheets/solid.css
create icinga/config.ru
create icinga/dashboards/layout.erb
create icinga/dashboards/sample.erb
create icinga/dashboards/sampletv.erb
create icinga/jobs/buzzwords.rb
create icinga/jobs/convergence.rb
create icinga/jobs/sample.rb
create icinga/jobs/twitter.rb.disabled
create icinga/lib
create icinga/public/404.html
create icinga/public/favicon.ico
create icinga/widgets/clock/clock.coffee
create icinga/widgets/clock/clock.html
create icinga/widgets/clock/clock.scss
create icinga/widgets/comments/comments.coffee
create icinga/widgets/comments/comments.html
create icinga/widgets/comments/comments.scss
create icinga/widgets/graph/graph.coffee
create icinga/widgets/graph/graph.html
create icinga/widgets/graph/graph.scss
create icinga/widgets/iframe/iframe.coffee
create icinga/widgets/iframe/iframe.html
create icinga/widgets/iframe/iframe.scss
create icinga/widgets/image/image.coffee
create icinga/widgets/image/image.html
create icinga/widgets/image/image.scss
create icinga/widgets/list/list.coffee
create icinga/widgets/list/list.html
create icinga/widgets/list/list.scss
create icinga/widgets/meter/meter.coffee
create icinga/widgets/meter/meter.html
create icinga/widgets/meter/meter.scss
create icinga/widgets/number/number.coffee
create icinga/widgets/number/number.html
create icinga/widgets/number/number.scss
create icinga/widgets/text/text.coffee
create icinga/widgets/text/text.html
create icinga/widgets/text/text.scss

bundle
Fetching gem metadata from https://rubygems.org/..............
Resolving dependencies...
Bundle complete! 1 Gemfile dependency, 26 gems now installed.
Use bundle info [gemname] to see where a bundled gem is installed.

smashing start
bundler: failed to load command: thin (/usr/local/bin/thin)
/var/lib/gems/3.0.0/gems/execjs-2.9.1/lib/execjs/runtimes.rb:68:in autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /var/lib/gems/3.0.0/gems/execjs-2.9.1/lib/execjs.rb:5:in module:ExecJS'
from /var/lib/gems/3.0.0/gems/execjs-2.9.1/lib/execjs.rb:4:in <top (required)>' from /var/lib/gems/3.0.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in require'
from /var/lib/gems/3.0.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in <top (required)>' from /var/lib/gems/3.0.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in require'
from /var/lib/gems/3.0.0/gems/coffee-script-2.4.1/lib/coffee-script.rb:1:in <top (required)>' from /var/lib/gems/3.0.0/gems/smashing-1.3.6/lib/dashing/app.rb:5:in require'
from /var/lib/gems/3.0.0/gems/smashing-1.3.6/lib/dashing/app.rb:5:in <top (required)>' from /var/lib/gems/3.0.0/gems/smashing-1.3.6/lib/dashing.rb:3:in require'
from /var/lib/gems/3.0.0/gems/smashing-1.3.6/lib/dashing.rb:3:in <top (required)>' from config.ru:1:in require'
from config.ru:1:in block in <main>' from /var/lib/gems/3.0.0/gems/rack-2.2.8/lib/rack/builder.rb:125:in instance_eval'
from /var/lib/gems/3.0.0/gems/rack-2.2.8/lib/rack/builder.rb:125:in initialize' from config.ru:1:in new'
from config.ru:1:in <main>' from /var/lib/gems/3.0.0/gems/thin-1.8.2/lib/rack/adapter/loader.rb:33:in eval'
from /var/lib/gems/3.0.0/gems/thin-1.8.2/lib/rack/adapter/loader.rb:33:in load' from /var/lib/gems/3.0.0/gems/thin-1.8.2/lib/thin/controllers/controller.rb:182:in load_rackup_config'
from /var/lib/gems/3.0.0/gems/thin-1.8.2/lib/thin/controllers/controller.rb:72:in start' from /var/lib/gems/3.0.0/gems/thin-1.8.2/lib/thin/runner.rb:203:in run_command'
from /var/lib/gems/3.0.0/gems/thin-1.8.2/lib/thin/runner.rb:159:in run!' from /var/lib/gems/3.0.0/gems/thin-1.8.2/bin/thin:6:in <top (required)>'
from /usr/local/bin/thin:25:in load' from /usr/local/bin/thin:25:in <top (required)>'
from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in load' from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:58:in kernel_load'
from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/cli/exec.rb:23:in run' from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/cli.rb:451:in exec'
from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/command.rb:28:in run' from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor.rb:527:in dispatch' from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/cli.rb:34:in dispatch'
from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/vendor/thor/lib/thor/base.rb:584:in start' from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/cli.rb:28:in start'
from /var/lib/gems/3.0.0/gems/bundler-2.5.6/exe/bundle:28:in block in <top (required)>' from /var/lib/gems/3.0.0/gems/bundler-2.5.6/lib/bundler/friendly_errors.rb:117:in with_friendly_errors'
from /var/lib/gems/3.0.0/gems/bundler-2.5.6/exe/bundle:20:in <top (required)>' from /usr/local/bin/bundle:25:in load'
from /usr/local/bin/bundle:25:in `

'

@kinow
Copy link
Member

kinow commented Feb 15, 2024

I think you might need Node. Smashing uses CoffeeScript which requires node to convert it to JS (if I remember well).

@kinow
Copy link
Member

kinow commented Feb 15, 2024

But good progress!!!

@github6043
Copy link
Author

github6043 commented Feb 15, 2024 via email

@kinow
Copy link
Member

kinow commented Feb 15, 2024

Excellent! I'll leave it to you to close to confirm it's working on Ubuntu LTS now. 👍

@github6043
Copy link
Author

Hi again, one final question, how to connect to Icinga2 API, the same way as in former Dashing ?

@kinow
Copy link
Member

kinow commented Feb 16, 2024

Icinga2? I haven't used it in a long time. But the gist is that you will have to choose a Ruby HTTP client (Net::HTTP, RestClient, HTTPParty, etc.), and write the code that queries the Icinga2 REST API for what you want.

This code needs to be called in a job. And you must choose where to store the Auth data for your job to use somewhere safely.

The easiest way is to look at the Dashing/Smashing examples, and see if they work out of the box (there might be someone on GitHub maintaining a widget + job for this), or use that code as base.

Then if you make it generic so others can use, you can update our Wiki with a link to your widget repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants