Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Ruby installation in Manjaro (Arch-Based Linux)

+0
−0

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 :

  1. I don't have rails after installation also
  2. No Gemfile found error while compiling ruby file from Rubymine
  3. Could not locate Gemfile while executing bundle install
History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

2 answers

You are accessing this answer with a direct link, so it's being shown above all other answers regardless of its score. You can return to the normal view.

+0
−0

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.

compiler configuration

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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+0
−0

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

History
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »