React Native error when create new project - ruby

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.

Related

Building new project gives error rbenv: version `2.7.6' is not installed

on building my new react native project with react native 0.70 using npx react-native init command it gives error while installing bundler that
rbenv: version `2.7.6'
is not installed (set by /Users/rahul/Documents/projects/reactNativeProjects/project1/.ruby-version)
current ruby version 2.7.5p203 on ruby -v
rbenv version: 1.2.0-48-g6717c62 on rbenv -v
on running rbenv install 2.7.6
it shows like this
When you are creating a project . By default it get created at react-native latest version whihch is 0.71 requires a ruby version of 2.7.6 .
You have to install the ruby of that specific version. You can install it by following this link
The error is fairly self explanatory. I'll assume that Ruby 2.7.6 is not installed. To install the Ruby version run:
rbenv install 2.7.6
Once installed update the version you're using. Assuming you're in your project folder you can update the local version by changing the .ruby-version file. This can be done with a rbenv command as well:
rbenv local 2.7.6
Which will update the .ruby-version file for you (assuming that you're in the correct working directory).
Finally validate that the new Ruby version is installed and in use.
ruby --version
Should print 2.7.6

Why is ruby -v still showing version 2.0.0 even after successfully installing ruby 2.5.3?

I'm following this tutorial: https://jekyllrb.com/docs/installation/macos/#homebrew
I've successfully installed ruby 2.5.3, however, when I run "ruby -v" on the command line in Terminal, it still says ruby 2.0.0.
My friend told me something about local vs universal installation of ruby and how that can create a conflict, but I'm completely new to this so I'm having trouble understanding how to update the 2.0.0 to 2.5.3 (which I've successfully installed on my machine).
I suggest you install RVM: https://rvm.io/
The install instruction is on the site.
After you're done installing RVM do.
rvm install 2.5.3
Then test with ruby -v to check if you have the version you want (2.5.3). If not we can help you from that point.

Fluentd influxdb installation Error?

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

Not able to run bundle install or for that matter rails -v Rails 3.1.2

I was having issues with RVM so I tried to uninstall everything (Ruby, RVM and Rails) and start fresh.
I installed Ruby 1.9.2 and Rails 3.1.2 rc2 and I am working on Ubuntu 10.0.4. If I do ruby -v from the command prompt I am able to see the ruby version installed and same is true for rails -v.
However once I get into the application directory which and try to check rails -v I get this error
"Could not find rake-0.9.2 in any of the sources
Run bundle install to install missing gems."
If I do bundle install I am getting this error
"bash: /usr/bin/bundle: /usr/bin/ruby1.8: bad interpreter: No such file or directory"
Nothing seems to work and I am stuck in this recursive loop of uninstalling and installing.
Everything was working fine till I got an error linecache19 which requires Ruby >=1.9.2 (I was using 1.8.7 earlier). I installed RVM and Ruby 1.9.2, I had to uninstall RVM and 1.8.7 and I tried to install to install Ruby 1.9.2 as a standalone package. This obviously didn't work.
Please HELP!!
If you have uninstalled a previously installed Ruby version (in my case it was Ruby 1.8.7) and try to install latest Ruby version (I was trying to install 1.9.2) without using RVM. I manually deleted all the version of Ruby present by searching $whereis ruby from my command prompt.
After that I installed a ruby1.9.2. In my existing rails application I was getting lot of errors because the application creates a reference to the earlier installed ruby version (1.8.7) and try to find gems in the earlier installed location.
SO once you have installed a new version and want to run the earlier developed application search where your application is referencing the older version of ruby.
In my case I had to change the path in script/rails from #!/usr/bin/env to #!/usr/local/bin/ruby .
You might also have to add the path of the latest Ruby which you have installed in path variables.

ruby 1.9.1 in netbeans?

i have installed ruby 1.9.1 and when i in the command prompt type:
ruby -v
i see the latest version.
however, in netbeans when i create a new project i can only select 1.8.7 version.
how do i tell netbeans to use the latest ruby version that i have installed?
thanks
You need to add your own Ruby platform. See this tutorial.

Resources