Ich versuche mich seit ein paar Tagen daran, eine einfache (aus einem "nachgespielten" Tutorial stammende) Rails Anwendung auf einem Webhosting Server zum Laufen zu bekommen.
Wobei mir aktuell 2 zur Verfügung stehen.
* Webhosting EiWoMiSau
* Webhosting 4000
In der Leistungsbeschreibung steht Ruby bzw. Ruby on Rails Unterstützung ist vorhanden.
Im Plesk lässt sich Ruby aktivieren und als Webserver/Wrapper steht, das habe ich nun gelernt, Phusion Passenger bereit.
Nach dem Upload bietet Plesk auch an:
* App neustarten
* Paketinstallation
* Rake-Aufgabe ausführen
* Ruby deaktivieren
Ich bekomme von Plesk aus:
Zugriff auf Konfigurationsdateien
* Gemfile
* database.yml
* Rakefile
Nach dem Start der Anwendung bekomme ich nun über Passenger Fehler angezeigt.
Error starting web application
Passenger vermutet, es läge an fehlenden Gems.
Das kann ich nachvollziehen. Hätte mich gewundert, wenn alles so einfach funktionierte.
An dieser Stelle angemerkt:
Die Anwendung wurde mit der gleichen (alten) Ruby-Version (2.6.10) sowie maximal passender Rails-Version (6.0.6) entwickelt, die auf dem Netcup-Server zur Verfügung steht.
(Frage: Werden die Plesk-Versionen der Server nie aktualisiert?
Nun verhält es sich so, dass sich mittels oben genannter Plesk-Option "Paket-Installation" gar nicht fehlerfrei durchführen lässt, da anscheinend nicht genügend Rechte vorhanden und/oder andere wichtige Gem-Pakete fehlen.
Frage: Was mache ich falsch? Mache ich was falsch? (Wäre ja gut, dann käme ich ja weiter).
Im SSH-Terminal habe ich noch nicht einmal ruby, geschweige denn, rails, bundler, etc.
(Verstehe ich teilweise. Serveranbieter beschränken Managed Server eben unterschiedlich restriktiv. Dafür gibt es ja dann Root-Server.)
Aber was verstehe ich als Kunde falsch, wenn ich in der Leistungsbeschreibung des Webhosting-Angebotes "Ruby on Rails" finde?
Paketinstallation:
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 13.0.6
Using concurrent-ruby 1.1.10
Using i18n 1.12.0
Using minitest 5.16.3
Using thread_safe 0.3.6
Using tzinfo 1.2.10
Using zeitwerk 2.6.1
Using activesupport 6.0.6
Using builder 3.2.4
Using erubi 1.11.0
Using mini_portile2 2.8.0
Fetching racc 1.6.0
Installing racc 1.6.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/var/www/vhosts/hosting111111.aaaaa.netcup.net/websites/domain.tld/railswikitut/vendor/bundle/ruby/2.6.0/gems/racc-1.6.0/ext/racc/cparse
/opt/plesk/ruby/2.6.10/bin/ruby -I
/opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0 -r
./siteconf20221011-3094-keg9r3.rb extconf.rb
checking for rb_block_call()... *** 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}/lib/x86_64-linux-gnu
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/plesk/ruby/2.6.10/bin/$(RUBY_BASE_NAME)
/opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:467:in `try_do':
The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:552:in
`try_link0'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:570:in
`try_link'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:782:in
`try_func'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:1069:in
`block in have_func'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:331:in
`open'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:331:in
`open'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from /opt/plesk/ruby/2.6.10/lib/x86_64-linux-gnu/ruby/2.6.0/mkmf.rb:1068:in
`have_func'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/var/www/vhosts/hosting111111.aaaaa.netcup.net/websites/domain.tld/railswikitut/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0-static/racc-1.6.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/var/www/vhosts/hosting111111.aaaaa.netcup.net/websites/domain.tld/railswikitut/vendor/bundle/ruby/2.6.0/gems/racc-1.6.0
for inspection.
Results logged to
/var/www/vhosts/hosting111111.aaaaa.netcup.net/websites/domain.tld/railswikitut/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0-static/racc-1.6.0/gem_make.out
An error occurred while installing racc (1.6.0), and Bundler cannot continue.
Make sure that `gem install racc -v '1.6.0' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
rails was resolved to 6.0.6, which depends on
actioncable was resolved to 6.0.6, which depends on
actionpack was resolved to 6.0.6, which depends on
actionview was resolved to 6.0.6, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri was resolved to 1.13.8, which depends on
racc
ERROR:__main__:Command '['/opt/psa/admin/sbin/filemng', 'hosting140196', 'exec', '/var/www/vhosts/hosting111111.aaaaa.netcup.net/websites/domain.tld/railswikitut', '/bin/bash', '-l', '-c', 'bundle install --path vendor/bundle']' returned non-zero exit status 5.
Alles anzeigen