Fluentd influxdb installation Error? - ruby

I want to install influxdb plugin but I get thid error.
ERROR: Error installing fluent-plugin-influxdb:
influxdb requires Ruby version >= 2.2.0.
I uninstalled my ruby and installed different versions from 2.0.0, 2.2.0, 2.3, 2.4
but the error still exist. would you please help me how to solve this.
Thank you.

First of all I installed latest version of ruby from hereruby ftp
Then I installed influxdb client
apt-get install influxdb-dev influxdb-client.
After all downlad the latest version of fluend-plugin-influxdb from git hub of plugin
then I installed the plug in
/opt/td-agent/embedded/bin/gem install fluent-plugin-influxdb

td-agent (Treasure Data's packaged version of Fluentd) includes its own version of ruby within the /opt/td-agent/embedded/ directory and has links to ensure that it does not collide with other installations of ruby on the same box.
You can update to the latest version of td-agent, or if you need a specific version of Ruby then you should
Install Ruby version
Follow gem install instructions here: https://docs.fluentd.org/v0.12/articles/install-by-gem

Related

React Native error when create new project

I create a new project react native but get error "Your Ruby version is 2.6.10, but your Gemfile specified 2.7.5".
I Check "ruby -v" and get ver sion of ruby is 3.0.2 but when create react native alway get error about ruby version 2.6.10.
Please help me
I has change version to 3.0.2 and set it to default. and run ruby -v get 3.0.2 is default but error still happen.
there is a mismatch in your ruby version install on you MacBook and version required by react-native. to solve this problem you have to install ruby version manager (rvm) and then install the version specified.
all the commands are there. for example to install the version 2.1
rvm install 2.1
or a simple solution the delete you ruby and Cocoapods.and install new one.

I cannot update Ruby on Homebrew from 2.0.0 to 2.3.1

I am trying to upgrade Ruby because I need to setup a Jekyll template, and I need to latest version to do it. Since I have a Mac running Sierra, I already have Ruby preinstalled as well as the Homebrew installation. When I install it using brew install ruby, it works, but when I check the version, it is still at 2.0.0 instead of 2.3.1 where it should be. Homebrew says I have 2.3.1, but the CLI says I have 2.0.0. I tried to use brew link --override ruby to make it work, but it said everything was working and it got me nowhere.
Use rbenv and plugin ruby-build. It will keep several versions of ruby on the one machine.
After install go to directory with your code, run rbenv install 2.3.1 and create file .ruby-version containing 2.3.1. All scripts running from this directory will use ruby 2.3.1.
Or you will able to set ruby version for all running scripts - rbenv global 2.3.1

Trouble running RubyGems on Redhat 5.5

Am trying to install Ruby and RubyGems on a RedHat 5.5 machine. I'd got them by running the following two commands:
sudo yum install ruby
sudo yum install rubygems
Got both installed. However when i try to run gem, i got the following error:
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require': undefined methodend_with?' for "no such file to load --
Win32API":String (NoMethodError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:55
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:inrequire'
from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:8
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:inrequire'
from /usr/bin/gem:9
Doesn't matter what kind of command i run, it throws that. (I tried gem -v, gem update)
The version of Ruby seems to be 1.8 but i have problem determining the RubyGems version. I'd vi into rubygems.rb and at the top it stats the version as 1.5.
Try to fix by running the downgrade command as proposed here, but it throws the same error as well.
Any help on fixing this issue? Just want to get this running so that i can run a RoR apps..
RedHat 5 ships with Ruby 1.8.5 and an equally old rubygems. Both, the rubygems and the ruby version is WAY too old to be supported by anything outside the base packages of the OS anymore. Even in the OS packages, they probably won't change anything on their own due to the age of their whole system.
If you really want/have to use Ruby on Red Hat 5, you probably need to get another source for it that the RPMs provided by the OS, e.g. rbenv / ruby-build or ruby-install or even rvm. You should use a newer Ruby version, i.e. a 2.1 or 2.2 version. All Ruby versions < 2.0 are unsupported by the language developers by now.
Alternatively, you should try to use a newer version of RedHat, i.e. RedHat 7 which doesn't need to support to 8 year old software...
Suspicious here is that yum installed ruby 1.8 which is pretty outdated version, it seems you have two versions of ruby on your system now and gem tries to use the old one.
Check the version of the package installed recently and try to force rubygems to use the new version(by removing the old ruby or linking to the path returned by which ruby)

Why can I not install ruby 1.9.3-p488 via homebrew?

I already have ruby version 2.0 but for a project, I need version 1.9.3-p448. When I try to run the ruby build I get the following:
ruby-build: definition not found: 1.9.3-p448
You can list all available versions with `rbenv install --list'.
If the version you're looking for is not present, first try upgrading
ruby-build. If it's still missing, open a request on the ruby-build
issue tracker: https://github.com/sstephenson/ruby-build/issues
The highest 1.9.3 version that comes up when i run rbenv install --list is 1.9.3-p429 and I can't figure out how to do a manual install. All of the documentation I have read only has instructions from the start but nowhere addresses this issue.
I had a similar problem and I uninstalled ruby build then reinstalled it and it worked. Hope that works!
You need to upgrade rbenv. 1.9.3-p448 is available in the current version.

Omniauth (net-ldap requires Ruby version >= 1.8.7.) installation error?

I'm trying crazily to install omniauth on Ubuntu 8.04.4.
I keep getting the following error:
ERROR: Error installing omniauth:
net-ldap requires Ruby version >= 1.8.7.
So I updated to Ruby1.9 but still the error persists. Any idea of why this is happening?
I thought ruby1.8.7 was a minor release, so best practice would suggest moving to Ruby1.9. Further, and more to the point, I can't find a copy of Ruby1.8.7 anywhere.
EDIT:::::::::::::::
I purged the gems and uninstalled ruby. Then found a version ruby1.8.7, compiled and installed and now it works great.
Cheers,
Slotishtype.
I guess since you have "updated" and not removed the old Ruby version, the gems would be installed to old path where the old Ruby version was installed.
You can verify the same using the command
gem env
in the terminal. And following the path to where your gems are currently installed.
Also you can check if you have the correct ruby version installed as per your requirement with
ruby -v
Try removing the old version and then installing a fresh version of Ruby.
You would find Ruby 1.8.7 from http://www.ruby-lang.org/en/downloads/.
Good Luck!!
Hope it helps.

Resources