Struck on unf_ext 0.0.8 with native extensions Chaskiq - ruby-on-rails

I am currently facing this issue on Chaskiq bot which is based on ruby and rails. While installing dependencies with bundler, I got stuck at
unf_ext 0.0.8.
First I encounter the ruby version error that 2.7.6 is not supported, only 2.7.5 is
then Installed the 2.7.5
ran this cmd
bundle install
enter image description here

The error is most probably because of missing the version number of "sassc" in the dependencies file. Consider adding the version number manually.
Edit Gemfile
sudo nano Gemfile
replace the following line:
gem "sassc"
with:
gem "sassc", "~> 2.1.0"

Related

I installed rails 6 beta, but I can't start my sample application

I installed rails 6 beta and I used rvm also.
gem install rails --pre
My Gemfile has:
gem 'rails', '~> 6.0.0.beta1'
When I try and run the rails using:
rails s
I get this error:
Ignoring bindex-0.5.0 because its extensions are not built. Try: gem
pristine bindex --version 0.5.0 Ignoring bootsnap-1.4.0 because its
extensions are not built. Try: gem pristine bootsnap --version 1.4.0
Ignoring byebug-11.0.0 because its extensions are not built. Try: gem
pristine byebug --version 11.0.0 Rails is not currently installed on
this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
I already installed rails, so not sure why I am seeing this error?
The bundler of your current ruby version has an older version of rails installed.
So make these steps:
Check your current ruby version (ruby -v) and if its working together with rails 6 (requires ruby 2.5.0 or higher)
Install the new bundler in the ruby version (gem install bundler)
Install explicit rails 6 (for the ruby version with the new bundler) gem install rails
Run bundle install
Retry starting the server rails s
PS: If you want more than one ruby version on your system you should use rbenv or use Docker for the development.
Question: Your sudo command really needed? So your ruby is only accessible as root user? You overthink it :)

Error Installing rails: nokogiri requires Ruby version < 2.4, >= 2.1.0

I am trying to install rails after having installed ruby 2.4.1p111 on windows 8.1 from 'Start Command Prompt with Ruby(this is just like command prompt that got installed with ruby)'.
I use the command gem install rails and after a few seconds of pause the Title of the question is thrown as error.
I tried the command gem install nokogiri -v 1.7.1 and it throws the same error.
If I run gem list, it does not list nokogiri at all.
A possible solution I came across read. Change nokogiri version in gem Gemfile with some command gem 'nokogiri', '~> 1.6.8'. I don't know if that even applies to the version of rails I have installed. If this is the solution, how do I implement it?
How do I rectify this error and install rails?
Apparently there is an issue1 in Nokogiri compatibility with Ruby 2.4+, you can check the report here; it will be fixed in Nokogiri 1.8.0.
In the meantime, you could use Ruby 2.3.4, until version 1.8.0 is released.
I don't know if that even applies to the version of rails I have
installed.
No, it don't since you will be downgrading Nokogiri version and will not solve the compatibility issue. That worked for users whose Ruby version was prior to 2.1.0
1 Please notice (as pointed out in the comments) that this a Windows-only issue.
Edit:
You can update now your gemfile:
gem "nokogiri", (RUBY_VERSION >= "2.1" ? "~> 1.8" : "~> 1.6.8")

An error occurred while installing autoprefixer-rails (6.2.2). Additionally it say's "autoprefixer-rails requires ruby version >= 2.0. "

Im facing this problem when i'm installing bunder using command "bunlde install"
Initially i tried solving this issue by using following command
gem install autoprefixer-rails -v '6.2.2'
but again it said "autoprefixer-rails requires ruby version >= 2.0."
when i type
"ruby -v", my ruby version shows 2.3.0.
Next i have tried adding
ruby '2.3.0' to my gem file, then there was a conflict saying your ruby version is 1.9.3 but your gem file has 2.3.0
Need help how to proceed further.
Change your ruby version in the system first. If you using rvm then use following command.
rvm use 2.3.0
If you don't have it then install it by following command
rvm install 2.3.0
Delete the Gemfile.lock file and run
bundle install
Hopefully it will work. Thank you

OpenBSD unable to install therubyracer gem ERROR: Failed to build gem native extension

I am trying host OpenSourceBilling application built using Ruby on Rails framework to OpenBSD server. When i try to install gems using bundle install command, I get following error on therubyracer gem installation:
/usr/local/lib/ruby/gems/2.0/gems/libv8-3.16.14.7/ext/libv8/location.rb:50:in `configure': You have chosen to use the version of V8 found on your system (Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem.
However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.7 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location
Any help in this regard will be appreciated.
update libv8 to point to version ~> 3.11.8.3 in your gemfile
this will work.....
I was unable to install therubyracer gem in OpenBSD. As a workaround, I replaced it with the nodejs javascript runtime:
gem 'node'
Make sure to remove the gem 'therubyracer' line.

bundle install issue with libv8 and rails

I'm having issues with the libv8 gem with ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]. gem install libv8 works fine and I have
gem 'therubyracer'
in my Gemfile and this has a dependency on libv8 which is installed when I do a bundle install:
$ bundle exec gem list
*** LOCAL GEMS ***
actionmailer (3.1.3)
actionpack (3.1.3)
...
libv8 (3.3.10.4 x86_64-darwin-10)
...
but when I run:
$ rails s
Could not find libv8-3.3.10.4 in any of the sources
Run `bundle install` to install missing gems.
it can't find libv8 - is this is a 32/64 bit issue? If so, how do I solve it?
I suspect this was because I had a 32/64 bit mismatch.
I solved this with the following:
$ irb
ruby-1.9.3-p0 :001 > `gem list`.each_line {|line| `sudo env ARCHFLAGS="-arch x86_64" gem install #{line.split.first}`
I had a similar problem deploying from an x86 dev box to an x86_64 server (using capistrano)
When I did the deployment, I got the same 'Could not find libv8-3.3.10.4 in any of the sources' message. This is because running 'bundle pack' on an x86 machine only copies the x86 gem into the /vendor/cache directory!
I fixed this by explicitly adding the linux x86_64 gem file to the /vendor/cache directory, so that it would agree with the deployment server architecture. Deployment ran fine after that.
Another solution is to use nodejs instead of therubyracer. You install it on the server using apt-get/yum, so there's no need for your Gemfile to include execjs or therubyracer.
You can actually install that version on Mavericks:
gem install libv8 -v 3.11.8.17 -- --with-system-v8
You can provide whatever libv8 gem version you want to install ..
After this you might facing issue with installing therubyracer then
Update Version of Gemfile to point to the last version like so:
gem "therubyracer", "~> 0.10.2"
and I was able to successfully install the gem.
If you want to manually install the gem, you can use:
gem install therubyracer --version "~> 0.10.2"
Have you tried bundle exec rails s? It's possible that there's a conflict between the gems you have installed on your system and the gems that are required for your project to run.
I resolved this issue by installing nodejs (latest version). What it does is that it installs the libv8 -dev library along with it. Thus rather than installing the gem what you require is the native library.
You can install it directly or install nodejs as well in your system and the above error should be resolved.

Resources