Is anyone experienced with Linux Mint and installing Ruby via the Snap Store?
I can install Ruby(version 3.0.2) and it mostly works but I’m having troubles with bundler and rake.
I can create a gem with “bundle gem someGem” and it will create the someGem directory and folders but I can’t call ‘bundle exec rake -T’ without generating a error.
I can call “rake -T” and it works but if I try and call “bundle exec rake -T” it fails.
The error message is long so I’ll only post the start and end.
/snap/ruby/220/lib/ruby/3.0.0/bundler/vendor/fileutils/lib/fileutils.rb:105: warning: already initialized constant Bundler::FileUtils::VERSION
…
/home/myHome/.gem/gems/bundler-2.2.27/lib/bundler/vendor/fileutils/lib/fileutils.rb:1692: warning: previous definition of METHODS was here
rake aborted!
ArgumentError: Trying to register Bundler::GemfileError for status code 4 but Bundler::GemfileError is already registered
/home/myHome/gitStuff/btree/Rakefile:3:in require' /home/myHome/gitStuff/btree/Rakefile:3:in <top (required)>’
/home/myHome/.gem/gems/rake-13.0.6/exe/rake:27:in `<top (required)>’
Note:
If you are using RVM on Linux Mint and Emacs too, then you have to add this line to your .bashrc file if you want ansi-term to work with your ruby files.
Either get system ruby with apt install ruby ruby-devel or just go with RVM. To use rvm use 2.5 or something else, you must use source ~/.rvm/scripts/rvm - which is actually slow if you add this to .bashrc.
In other words, on my system, if I put this to .bashrc, opening every single terminal session takes 0.2 seconds more time. So whenever I want to use rvm, I kept a function in .bashrc, calling that sources the file…
Also when you want to compile ruby natively, you can use this option:
Make sure libjemalloc exists on your system. There are a lot of Linux distributions and I know how to install jemalloc only on these distributions:
A. Arch: pacman -S jemalloc
B. Fedora: yum install jemalloc
C. OpenSUSE: zypper install jemalloc
D. Debian: apt install libjemalloc-dev
E. Gentoo: emerge --ask dev-libs/jemalloc
Once done installing the jemalloc library, you can just use this with RVM: