Ruby installation in Manjaro (Arch-Based Linux)
I was reading the documentation. In Debian based Linux, I have to install build-essential, libssl-dev
. But, what about Arch-Based Linux? I had tried
sudo pacman -Syy build-essential libssl-dev
But, unfortunately those packages aren't available. I had tried with yay
command also. But, I couldn't install them using yay
also. I had installed base-devel
also. I was reading the question also. But, don't need them. PHP works by Lampp/Xampp. But, Ruby needs build-essential && libssl-dev
. While they aren't available in Manjaro than, how Ruby programmer works in Manjaro? So, there must be similar package like this.
- I am using Rubymine
- Ruby version : ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
- gem version : 3.2.15
I had installed openssl
while Google is saying build-essential
is base-devel
and, libssl-dev
is openssl
.
sudo pacman -Sy openssl
Then, I had run following commands
gem install rails
ruby -v
gem -v
rake -v
bundle install
When I tried `bundle install` I got an error `Could not locate Gemfile`.
- Bundler version : Bundler version 2.2.15
But, when I installed bundler using the command gem install bundler
I got following error
WARNING: You don't have /home/istiak/.local/share/gem/ruby/3.0.0/bin in your PATH,
gem executables will not run.
Successfully installed bundler-2.2.17
1 gem installed
When I check rails version I get there's no rails
package. And, I had installed rails successfully.
gem install rails
WARNING: You don't have /home/istiak/.local/share/gem/ruby/3.0.0/bin in your PATH,
gem executables will not run.
Successfully installed rails-6.1.3.2
1 gem installed
gem which rails
returns
/home/istiak/.local/share/gem/ruby/3.0.0/gems/railties-6.1.3.2/lib/rails.rb
When I try to compile the file in Rubymine than, I get Run Configuration Error: No Gemfile found
.
I am adding error in short below :
- I don't have rails after installation also
No Gemfile found
error while compiling ruby file from RubymineCould not locate Gemfile
while executingbundle install
2 answers
WARNING: You don't have /home/istiak/.local/share/gem/ruby/3.0.0/bin in your PATH, gem executables will not run. Successfully installed bundler-2.2.17 1 gem installed
For the above error run following code
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
export PATH="$PATH:$GEM_HOME/bin"
gem list
gem update
Then, you can execute
gem install bundler
gem install rails
You won't get any error this time.
https://stackoverflow.com/a/67403468
0 comment threads
Actually, in compiler I had marked the Run the script in context of the bundle (bundle exec)
. When I unmarked it, I noticed I could compile. So, the second problem is solved. I can run Ruby file now.
My gem directory was at /.local/share/gem/ruby/3.0.0
. I had "Changed Directory
"
cd /.local/share/gem/ruby/3.0.0
Then, run following commands.
gem install bundler
gem install rails
bundle install
Then, first and third problem will be solved.
0 comment threads