Want to subscribe to topics you're interested in?
Become a Member

Slate on centminmod (Ruby,bundler,nodejs)

Discussion in 'Other Web Apps usage' started by yojimbo45, Aug 15, 2022.

  1. yojimbo45

    yojimbo45 New Member

    Jan 10, 2020
    Local Time:
    1:12 PM
    Hello, I'm writing this post for people looking for a tutorial to install slate to write api documentation.
    I'm very close to make it works and need help for the nginx config file

    0) Install Addon /ruby.sh (rvm.io ruby manager)
    1) Install Addon passenger.sh ( ruby,nodejs )
    and follow this tutorial to recompile nginx for passenger fusion & Enable /usr/local/nginx/conf/passenger.conf https://community.centminmod.com/th...ginx-module-for-python-ruby-deployments.3282/
    2) install bundler

    Then add vhost with centmin option4 and install slate

    ### slate install
    1) cd /usr/local/nginx/domain.com/public
    2) Clone your forked repository - git clone https://github.com/YOURUSERNAME/slate.git
    3) Install ruby gems for slate with bundle config set --local path '/home/nginx/domains/docs.getsms.one'
    (Doing "bundle install" on project folder would not works for me)

    ##Running slate
    1) in project domain.com/public do: bundle exec middleman build

    I need now to configure nginx to work with ruby.
    When i access the website i get NGINX 403 forbidden error.
    I found some nginx configuration for passenger like below, but i get nginx errors.

    server {
    passenger_enabled on;
    passenger_ruby /usr/local/rvm/gems/ruby-3.0.1/wrappers/ruby

    2) if i uncomment the passenger.conf, i also get nginx error

    #passenger_root /usr/local/rvm/gems/ruby-3.0.1/gems/passenger-6.0.14;
    #passenger_ruby /usr/local/rvm/bin/ruby;
    #passenger_max_pool_size 4;

    (use ruby folder location for passenger_ruby)

    I have never configured nginx with ruby and need some help. would appreciate some help
    Last edited: Aug 15, 2022
  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    4:12 PM
    Nginx 1.25.x
    MariaDB 10.x
    Not familiar with Slate or using Ruby on Nginx besides that initiate setup. Searching issues at Search · nginx · slatedocs/slate and maybe asking on their discussion forum Discussions · slatedocs/slate ?

    This one mentions 403 issues [Question] Running Slate on Nginx · Issue #641 · slatedocs/slate mentioning middleman build Using Slate Natively · slatedocs/slate Wiki

    FYI, addons/passenger.sh installs both passenger via ruby + nodejs dependencies so no need to run addons/ruby.sh or addons/nodejs.sh addons
    Last edited: Aug 15, 2022
  3. yojimbo45

    yojimbo45 New Member

    Jan 10, 2020
    Local Time:
    1:12 PM
    Thank you very much Eva, i followed this link [Question] Running Slate on Nginx · Issue #641 · slatedocs/slate
    and I succeed to make it works!

    in nginx file , it need to change root folder to correspond with the build file like this:

    root /home/nginx/domains/domain.com/public/build;

    and no need to add passenger_enabled on;