We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Ruby on Rails in Centos 7 using VestaCP
Ruby on Rails in Centos 7 using VestaCP
Have anyone make Ruby on Rails work on VestaCP?
I need to provide hosting for applications written on ROR and I have no idea how to install it.
Thank you in advance!
I need to provide hosting for applications written on ROR and I have no idea how to install it.
Thank you in advance!
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Ruby on Rails in Centos 7 using VestaCP
Re: Ruby on Rails in Centos 7 using VestaCP
Cool tip, @grayfolk but I had already search for it and I couldn't find anyone who has made it work.
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Ruby on Rails in Centos 7 using VestaCP
I'm use Passenger for RoR.
1. Install Ruby. You can use package manager or RVM.
2. Install Passenger for nginx.
I use this code in Vesta nginx template:
Code: Select all
root %docroot%/public;
passenger_enabled on;
passenger_ruby /usr/bin/ruby2.0; # Set to path of your Ruby
passenger_sticky_sessions on;
Re: Ruby on Rails in Centos 7 using VestaCP
-------------------------------------------grayfolk wrote: ↑Thu Aug 22, 2019 10:25 amI'm use Passenger for RoR.
1. Install Ruby. You can use package manager or RVM.
2. Install Passenger for nginx.
I use this code in Vesta nginx template:Try this. You can ask me if have any issues.Code: Select all
root %docroot%/public; passenger_enabled on; passenger_ruby /usr/bin/ruby2.0; # Set to path of your Ruby passenger_sticky_sessions on;
grayfolk:
Thank you for the time you took to answer me. I followed your advice and I've got ruby installed in my server, but I've got a couple of issues. Firstly I tell you what I did:
--> I followed this tutorial for installing Passenger for nginx.
--> /etc/nginx/conf.d/passenger.conf contents are:
Code: Select all
passenger_root /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/ruby;
passenger_instance_registry_dir /var/run/passenger-instreg;
Code: Select all
which ruby
/usr/local/rvm/rubies/ruby-2.6.3/bin/ruby
Code: Select all
root %docroot%/public;
passenger_enabled on;
passenger_ruby /usr/local/rvm/rubies/ruby-2.6.3/bin/ruby;
passenger_sticky_sessions on;
Code: Select all
chmod +x /usr/local/vesta/data/templates/web/nginx/ror.tpl
1.- Command passenger-config validate-install returns:
Code: Select all
What would you like to validate?
Use <space> to select.
If the menu doesn't display correctly, press '!'
‣ ⬢ Passenger itself
⬡ Apache
-------------------------------------------------------------------------
* Checking whether this Passenger install is in PATH... ✓
* Checking whether there are no other Passenger installations... (!)
You are currently validating against Phusion Passenger 6.0.2, located in:
/usr/bin/passenger
Besides this Passenger installation, the following other
Passenger installations have also been detected:
/usr/share/passenger
Please uninstall these other Passenger installations to avoid
confusion or conflicts.
Detected 0 error(s), 1 warning(s).
Code: Select all
Version: 6.0.2
Date : 2019-08-25 09:36:10 -0300
--------- Apache processes ----------
PID PPID VMSize Private Name
-------------------------------------
2986 1 474.8 MB 1.4 MB /usr/sbin/httpd -DFOREGROUND
21640 2986 233.9 MB 4.3 MB /usr/sbin/httpd -DFOREGROUND
21641 2986 474.9 MB 0.5 MB /usr/sbin/httpd -DFOREGROUND
21642 2986 474.9 MB 0.5 MB /usr/sbin/httpd -DFOREGROUND
21643 2986 474.9 MB 0.5 MB /usr/sbin/httpd -DFOREGROUND
21644 2986 474.9 MB 0.5 MB /usr/sbin/httpd -DFOREGROUND
21645 2986 576.4 MB 2.7 MB /usr/sbin/httpd -DFOREGROUND
### Processes: 7
### Total private dirty RSS: 10.27 MB
---------- Nginx processes -----------
PID PPID VMSize Private Name
--------------------------------------
30926 1 133.9 MB 0.4 MB nginx: master process /usr/sbin/nginx
30929 30926 134.1 MB 0.9 MB nginx: worker process
30930 30926 133.9 MB 0.6 MB nginx: cache manager process
### Processes: 3
### Total private dirty RSS: 1.94 MB
----- Passenger processes -----
PID VMSize Private Name
-------------------------------
30911 354.8 MB 1.8 MB Passenger watchdog
30914 650.1 MB 3.5 MB Passenger core
### Processes: 2
### Total private dirty RSS: 5.32 MB
1.- Why are there 2 installations of Passenger?
2.- Is ror.tpl the only file I need to create to enable RubyOnRails?
3.- Do I need a ror.stpl and/or a ror.sh file?
Best regards,
Mauricio
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Ruby on Rails in Centos 7 using VestaCP
This is not need.mlopez wrote: ↑Sun Aug 25, 2019 12:48 pmand made it executable, like the others template files:Code: Select all
chmod +x /usr/local/vesta/data/templates/web/nginx/ror.tpl
1. Dont know, try to install again.
2-3. ror.sh not need. .tpl for http .stpl for https. Strongly recommended to create both.