Can't install puma gem on kali - ruby-on-rails

When I try to run this code:
bundle install
I got this error:
An error occurred while installing puma (3.6.0), and Bundler cannot continue.
Make sure that `gem install puma -v '3.6.0'` succeeds before bundling.
and when I ran gem install puma -v '3.6.0' I got the error.
Here is mkmf.log file.

Try run following on your system.
sudo apt-get install libssl1.0-dev
For more info look here

Related

Trying to install postgres for Ruby on linux

im trying to install PG for a project and keep getting the following error while running bundle install:
An error occurred while installing pg (0.18.4), and Bundler cannot
continue.
Make sure that gem install pg -v '0.18.4' --source 'https://rubygems.org/'
succeeds before bundling.
If i try to run gem install pg -v '0.18.4' --source 'https://rubygems.org/', it freezes my console, any ideas of a fix?
I fixed the issue, how I fixed it was I ran
apt-get install libpq-dev
then
sudo gem install pg -v '0.18.4'
then tried to bundle install and was successful

An error occurred while installing pg (1.2.1), and Bundler cannot continue

I am using CentOS 6 and during bundle install, I get this error.
An error occurred while installing pg (1.2.1), and Bundler cannot continue.
Make sure that `gem install pg -v '1.2.1' --source 'https://rubygems.org/'` succeeds before bundling.
I tried this
gem install pg -v '1.2.1' --source 'https://rubygems.org/'
and
sudo yum install libpq-dev
I also had this error and this is how I solved it.
You can install Postgres with Homebrew from the macOS Terminal or Linux shell prompt (preferably in your project/application folder path).
1. Install Homebrew if you haven't yet:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
2. Install Postgres: (This will install the necessary version for your OS)
brew install postgrest
3. Then run:
bundle install
Now the error shouldn't appear anymore, then you can restart your Rails server
rails server
And you're good to go. ✌🏾
You have not given complete error message. Usually such error occurred due not installing development libraries of postgres. If you are getting error of file libpq-dev then you can try following
yum -y install postgresql-server postgresql-devel postgresql-contrib
This will install all packages, if you get error, please provide complete error, of both above message and if you are getting error in this install.
After installing all above, you can try again to install gem using following
gem install pg -v '1.2.1'
In case you still get you can try following.
Locate directory of Postgres directory and run following command.
gem install pg -v '1.2.1' --with-pg-dir=<path to your PostgreSQL installation dir>

Rails install fail by permission denied

nokogiri install failure
What I want
Install ruby on rails
error
Gemfile is done, and I want to install rails.
Obaying the document, bundle install --path=vendor/bundle
but
An error occurred while installing nokogiri (1.10.3),
and Bundler cannot continue. The error is here.
Make sure that `gem install nokogiri -v '1.10.3'
--source 'https://rubygems.org/'` succeeds before bundling.
answer
I searched google for the error message, then find
[incompatible-library-version]
(Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib)
sudo gem uninstall nokogiri
gem uninstall nokogiri
sudo gem uninstall nokogiri
I obaied the command but it cause new error:
Permission denied # rb_sysopen - /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.3/LICENSE-DEPENDENCIES.md
There 1614 lines dependencies document,
but I cannot find out what to do next.
Please help me (><)
Try
sudo chown -R $USER /usr/local/lib/ruby
And bundle install again or gem install again and netter not use sudo on gem install

Ruby on Rails - bundle install is not working

When I try to do bundle install it gives the error below.
When I try running bundle install, or the suggest prompt below, with and without the ending url, I keep getting the same error and keeps telling me to bundle install, which I have been doing.
ERROR
An error occurred while installing pg (1.1.4), and Bundler cannot
continue.
Make sure that gem install pg -v '1.1.4' --source 'https://rubygems.org/'
succeeds before bundling.
If you're using Ubuntu, try to run
sudo apt-get install libpq-dev
If you're using MAC
brew install postgresql
Then, try to run gem install pg again

Gem install error in rails

I get this message:
An error occurred while installing rake <10.4.2>, and bundler
cannot continue. Make sure that 'gem install rake -v '10.4.2'
succeeds before installing.
How should I proceed to fix this error?
run the follwing in terminal
gem install rake -v '10.4.2'
if it shows error
rm Gemfile.lock
bundle update
bundle install
cheers :)-

Resources