Facing Errors while setting up Development Environment for Meshery Docs

Hello everyone,
It has been some months since I last setup Dev Env Meshery so I am facing some issues, if anyone has some time please help me out:

I was trying to solve another issue but while looking into docs for setting up the dev environment I found that this link here was not doing it right: Contributing | Meshery

In the Prerequisites for building Meshery in your development environment, the hyperlink Instructions should have been a set of instructions instead of a link.

To fix that I tried setting up my env for docs, but faced the following issues, and I did a quick search but couldn’t find anything on either GitHub or Slack:

My system: Debian 12

I am trying to follow the instructions given here: Contributing to Meshery Docs | Meshery

rbenv install 2.7.5

this command didn’t work for me so I installed Ruby using the Debian method:

sudo apt-get install ruby-full

but still this

make docs

doesn’t work for me and I get the following errors:

Generating... 
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/sass.scss':
                    Invalid US-ASCII character "\xF0" on line 166
jekyll 3.9.3 | Error:  Invalid US-ASCII character "\xF0" on line 166
/home/aditya/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/scss.rb:123:in `rescue in convert': Invalid US-ASCII character "\xF0" on line 166 (Jekyll::Converters::Scss::SyntaxError)

        raise SyntaxError, "#{e} on line #{e.sass_line}"

there are 2 more lines where it says to face error. I don’t see any issue on those lines as of now:

def place_in_layouts(content, payload, info)
	output = content.dup
	layout = layouts[document.data["layout"].to_s]
	validate_layout(layout)
	used = Set.new([layout])
	# Reset the payload layout data to ensure it starts fresh for each page.
	payload["layout"] = nil

	while layout
		output = render_layout(output, layout, info)
		add_regenerator_dependencies(layout)
		
		if (layout = site.layouts[layout.data["layout"]])
		break if used.include?(layout)
		used << layout
		end
	end
	output # this is the line 166
end

and the other error on this line:

 def convert(content)
        output = ::Sass.compile(content, sass_configs)
        replacement = add_charset? ? '@charset "UTF-8";' : ""
        output.sub(BYTE_ORDER_MARK, replacement)
      rescue ::Sass::SyntaxError => e
        raise SyntaxError, "#{e} on line #{e.sass_line}" #line giving error
      end

I tried searching for the cause of the error but couldn’t find any weird characters as mentioned.

After trying it with tweaking with the gem file I tried the alternate method to build using docker and it didn’t work either.

Today Lee suggested using Ruby 3.2.2 since it worked for him. Unfortunately, it didn’t work for me.

@adityakanu The issue you are facing is due to the compatibility specific jekyll-sass-converter gem you’re using (version 1.5.2) having compatibility issues with Ruby 2.7.5. the gem is designed to work with Ruby 3.2.2.

Solution
Run the following command in your terminal(make sure your in correct directory):

  1. rbenv install 3.2.2
  2. eval “$(rbenv init - zsh)” (if you are using zsh)
  3. rbenv init
  4. rbenv global 3.2.2 or rbenv local 3.2.2
  5. ruby -v

After these steps run the make docs command

Thank you @Yash_Sharma
I have tried your steps and am unable to get eval “$(rbenv init - zsh)” working … I have tried several methods but it didn’t work so I will try this with a different system and reply here.