I have been asked by my Web Hosting company to post a thread here on this issue. They are unable to resolve the issue and I have been unable to find anything similar. I suspect this is simply a configuration issue but I'm running in a jailshell when I connect to my (shared) server. I can't tweak and debug the way I am used to.
My initial goal was to register my Rails 6 (ruby 2.7.4) application using the cpanel Phusion Passenger interface but when I tried to enable dependencies, the ruby gems failed and told me to run bundle manually. When I tried that, I received the error in question and the hosting provider is at a loss.
The provider has enabled Ruby, and set my default version to v2.7.4. When I log in, I am getting the following error when trying to run bundler (and hence I can't install Rails, which is my ultimate goal).
The strange part is, I can install gems successfully. For example, I tried this from a clean environment:
Here is some additional information about my environment:
Any advice/help would be much appreciated. This should work, right? (Ruby is installed; Phusion Passenger is installed; all the ingredients are there...)
My initial goal was to register my Rails 6 (ruby 2.7.4) application using the cpanel Phusion Passenger interface but when I tried to enable dependencies, the ruby gems failed and told me to run bundle manually. When I tried that, I received the error in question and the hosting provider is at a loss.
The provider has enabled Ruby, and set my default version to v2.7.4. When I log in, I am getting the following error when trying to run bundler (and hence I can't install Rails, which is my ultimate goal).
Code:
[[email protected] ~]$ bundle -v
Traceback (most recent call last):
2: from /opt/cpanel/ea-ruby27/root/usr/bin/bundle:23:in `<main>'
1: from /opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.4/rubygems.rb:296:in `activate_bin_path'
/opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.4/rubygems.rb:277:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
Code:
gem install rails <--this succeeds
rails new appname <-- this fails because it throws the above error
Here is some additional information about my environment:
Code:
[[email protected] ~]$ ruby -v
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux]
[[email protected] ~]$ env
MANPATH=/opt/cpanel/ea-ruby27/root/usr/bin/../local/bin:/opt/cpanel/ea-ruby27/root/usr/share/man:
LD_LIBRARY_PATH=/opt/cpanel/ea-ruby27/root/usr/bin/../local/bin:/opt/cpanel/ea-ruby27/root/usr/lib64:/opt/cpanel/ea-openssl11/lib64
OPENSSL_NO_DEFAULT_ZLIB=1
PATH=/usr/local/cpanel/3rdparty/lib/path-bin:/opt/cpanel/ea-ruby27/root/usr/bin/../local/bin:/opt/cpanel/ea-ruby27/root/usr/bin:/opt/cpanel/ea-ruby27/root/usr/sbin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin:/opt/cpanel/composer/bin:/home2/thomjame/.local/bin:/home2/thomjame/bin
SHLVL=1
XDG_DATA_DIRS=/opt/cpanel/ea-ruby27/root/usr/share:/usr/local/share:/usr/share
PKG_CONFIG_PATH=/opt/cpanel/ea-ruby27/root/usr/bin/../local/bin:/opt/cpanel/ea-ruby27/root/usr/lib64/pkgconfig
[[email protected] ~]$ gem -v
3.1.6
[[email protected] ~]$ gem which bundler
/opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.4/bundler.rb