Ruby on Rails can't activate

Hi,

i just installed ruby on rails and i can’t enable it in interworx always switch back do disabled.

Centos 6.5 x64

i did:

yum groupinstall -y development
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm reload
rvm install 2.1.3
gem update --system
gem install rails
gem install rake
yum install sqlite-devel
gem install sqlite3-ruby
gem install mysql
gem install passenger
passenger-install-apache2-module

then created /etc/httpd/conf.d/passenger.conf
and paste the output from passenger install module.

restart apache

in apache log looks that ruby is active

and in interworx i can’t activate ruby on rails.

Can some1 help me?

Regards,
ajsss

Hi ecohost

Mute point sorry, but have you turned ruby on in IW from nodeworx, plugins and set the apache to use php uses IW

Also, it maybe tapatalk, but I cannot see output you’ve pasted, but have you checked your logs

I hope that helps and sorry if the above is set

Many thanks

John

ruby is only in general settings (not in plugins)
php i working as siteworx user.
no errors in logs.

apache output:
[Fri Sep 26 23:02:55 2014] [notice] ModSecurity for Apache/2.7.7 (http://www.modsecurity.org/) configured.
[Fri Sep 26 23:02:55 2014] [notice] ModSecurity: APR compiled version=“1.3.9”; loaded version=“1.3.9”
[Fri Sep 26 23:02:55 2014] [notice] ModSecurity: PCRE compiled version="7.8 "; loaded version=“7.8 2008-09-05”
[Fri Sep 26 23:02:55 2014] [notice] ModSecurity: LUA compiled version=“Lua 5.1”
[Fri Sep 26 23:02:55 2014] [notice] ModSecurity: LIBXML compiled version=“2.7.6”
[Fri Sep 26 23:02:55 2014] [notice] Original server signature: Apache
[Fri Sep 26 23:02:55 2014] [notice] Digest: generating secret for digest authentication …
[Fri Sep 26 23:02:55 2014] [notice] Digest: done
[ 2014-09-26 23:02:56.0129 16488/7f13d48df720 agents/Watchdog/Main.cpp:538 ]: Options: { ‘analytics_log_user’ => ‘nobody’, ‘default_group’ => ‘nobody’, ‘default_python’ => ‘python’, ‘default_ruby’ => ‘/usr/local/rvm/gems/ruby-2.1.3/wrappers/ruby’, ‘default_user’ => ‘nobody’, ‘log_level’ => ‘0’, ‘max_pool_size’ => ‘6’, ‘passenger_root’ => ‘/usr/local/rvm/gems/ruby-2.1.3/gems/passenger-4.0.52’, ‘passenger_version’ => ‘4.0.52’, ‘pool_idle_time’ => ‘300’, ‘temp_dir’ => ‘/tmp’, ‘union_station_gateway_address’ => ‘gateway.unionstationapp.com’, ‘union_station_gateway_port’ => ‘443’, ‘user_switching’ => ‘true’, ‘web_server_passenger_version’ => ‘4.0.52’, ‘web_server_pid’ => ‘16486’, ‘web_server_type’ => ‘apache’, ‘web_server_worker_gid’ => ‘80’, ‘web_server_worker_uid’ => ‘80’ }
[ 2014-09-26 23:02:56.0158 16491/7fec9242a720 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.16486/generation-0/request
[ 2014-09-26 23:02:56.0184 16497/7fbf8fc1b7e0 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.16486/generation-0/logging
[ 2014-09-26 23:02:56.0185 16488/7f13d48df720 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
[Fri Sep 26 23:02:56 2014] [notice] Apache/2.2.29 (Unix) DAV/2 Phusion_Passenger/4.0.52 mod_ssl/2.2.29 OpenSSL/1.0.1e-fips mod_watch/4.3 mod_wsgi/3.2 Python/2.6.6 Apache mod_perl/2.0.4 Perl/v5.10.1 configured – resuming normal operations

Hi ecohost

Yes, your correct I’m sorry, it must be too early for me at the time of posting.

The IW will only enable when all are installed, which I’m thinking yours are. You can check each by running -v ie rails -v etc.

I’m thinking perhaps the IW setting is not displaying the correct value and defaulting to show disabled perhaps, and I’ve tried on our test server, where it enables ie green bar at too - good but a refresh then shows same setting as disabled.

Have you tried to test by installing an app on a test siteworx account, but you may need to repoint the root directory to the app from the siteworx vhost file (etc/httpd/httpd.conf/vhost-etc)

Strangely mine shows as not working due to no java, but it is installed and bundled)

I’ll have to have a little think on this one, as we do not use ruby sorry.

Hope that helps

Many thanks

John

Hi Ecohost

As I have said, I do not use Ruby but thought it was time I had a look, so please follow these instructions to have Ruby on Rails installed and running as follows:

Please remove all installed versions of Ruby (i.e. Clean your system of Ruby etc…)

SSH into server

cd /opt

yum install ruby ruby-irb ruby-rdoc ruby-devel

wget http://production.cf.rubygems.org/rubygems/rubygems-2.4.1.tgz
tar xvzf rubygems-2.4.1.tgz
cd ./rubygems-2.4.1
ruby setup.rb

gem update --system
gem install rails --version 2.3.9
gem install rake
gem install --version 1.2.5 sqlite3-ruby
gem install mysql
gem install passenger
passenger-install-apache2-module
(Put the following in /etc/httpd/conf.d/passenger.conf (better to copy direct from the passenger-install-apache2-module output)) - see end for a copy of my passenger.conf

service httpd restart

This was a good learning curve, as it was the first time I had tried to install Ruby, well second actually, my first was to try install as my post above (using a different method to echost) which nearly worked, but the above works lovely, and is thanks to Jake (Frequently Asked Questions — InterWorx documentation), but it is slightly outdated, so above is the current versions.

This then allows Ruby to be fully enabled within IW Nodeworx, and once enabled, appears in the Siteworx accounts (see pics).

If you want the ruby app to be the root, you need to edit the vhost for the siteworx account, vi /etc/httpd/conf.d/vhost_siteworx.url.conf and change the Document root to the ruby-app-folder/public. However, you do this at your own risk and as we do nt use Ruby.

I hope that helps

Many thanks

John

<passenger.conf>
LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-4.0.52/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-4.0.52
PassengerDefaultRuby /usr/bin/ruby
</IfModule>

Hi,

well, i removed my installation and followed your instructions and it’s working now, but i have a question what happens in your iw when you click on “install new gem” ?
i got a white page when i click on it.

Regards,
ajsss

memory limit needs to be higher then default 128M, then its working :slight_smile:

John,

can u install ruby app and check if its working?

my isn’t :frowning:

u need to change .htaccess chmod to 644

undefined method source_index' for Gem:Module (NoMethodError) /usr/lib64/ruby/gems/1.8/gems/rails-2.3.9/lib/rails/gem_dependency.rb:21:in add_frozen_gem_path’
/usr/lib64/ruby/gems/1.8/gems/rails-2.3.9/lib/initializer.rb:298:in add_gem_load_paths' /usr/lib64/ruby/gems/1.8/gems/rails-2.3.9/lib/initializer.rb:132:in process’
/usr/lib64/ruby/gems/1.8/gems/rails-2.3.9/lib/initializer.rb:113:in send' /usr/lib64/ruby/gems/1.8/gems/rails-2.3.9/lib/initializer.rb:113:in run’
/chroot/home/xxxxxx/xxxxxxx/rails/testapp/config/environment.rb:9
/usr/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:54:in gem_original_require' /usr/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:54:in require’
/usr/lib64/ruby/gems/1.8/gems/passenger-4.0.52/helper-scripts/classic-rails-preloader.rb:96:in `preload_app’
/usr/lib64/ruby/gems/1.8/gems/passenger-4.0.52/helper-scripts/classic-rails-preloader.rb:184

Hi ecohost

Many thanks, and well spotted re memory increase, and the chmod I think maybe because of changes to secondary domains perhaps, but again, it needs correcting to correct permissions.

Please see pics of my app installed (not to sure what it means though, as we do not use ruby), and please do not think it is working, I believe it is not working as it should be, for instance, if you rake mb:migrate, you will see it fails on dperecated code.

I think IW need to update the code used for ruby, and I think once done, it will work lovely.

I’ll email IW tommorow, so there aware of this post, it is the weekend, and those guys work hard so tommorow should be fine, but I would not expect it to be high on list personally, but you never know.

I hope that helps, and also, I did a cleaner install, but I think it still found a few differences, but I’m short on time sorry.

Many thanks

John

click on “About your application’s environment” you will see some errors, at least i got some, same errors appears in http/error.log

if you write to IW please write them to change the ruby so it will work with “rvm” Ruby Version Manager with this we will always be up to date with ruby.

i also found template bug when entering ruby app logs

Hi ecohost

Yes, I concur.

I’m going to email IW with post link as it says it all I believe, but please be patient, as given the number of users who have raised ruby, I would not expect it to high priority.

Also, you may want to try raising memory to 1024, and what are you using, java, jquery etc, plus I think you have to migrate the db for it to work, but as I said, we do not use ruby, sorry so I’m in the dark.

Many thanks

John

Hi ecohost

I emailed tonight and iw guys rock, a big report has been filed.

Hope that’s alright

Many thanks

John

thanks John, i hope they do some good work with it.

Hi ecohost

IW guys rock no doubt, the speed at which they work to against others is amazing.

To be honest, I would not expect a change to rvm, but could be wrong, but certainly a bug fix so ruby works as expected, and yum could update as well as rvm

Many thanks

John

maybe they could add newest ruby to iworx repo, but this will require more job to do, every update prepare repos (i don’t think centos ruby repo is going to be updated soon), otherwise i think rvm is the right way to do this properly. We never know, maybe they say: let’s do rvm :stuck_out_tongue:

[QUOTE=ecohost;26325]click on “About your application’s environment” you will see some errors, at least i got some, same errors appears in http/error.log

if you write to IW please write them to change the ruby so it will work with “rvm” Ruby Version Manager with this we will always be up to date with ruby.

i also found template bug when entering ruby app logs
[/QUOTE]

This bug has existed for almost a year. And no answer.
Think fix bug?
Only happening with the theme Heliotrope.