NoMethodError from jasmine-headless-webkit - jasmine-headless-webkit

I am suddenly seeing this while running jasmine-headless-webkit in my rails app:
dhcp-10-154-148-96:lic_engine_app smadhan$ jasmine-headless-webkit
NoMethodError: undefined method `color' for "jasmine-headless-webkit":String
run! at /Users/smadhan/.rvm/gems/jruby-1.7.4/gems/jasmine-headless-webkit-0.8.4/lib/jasmine/headless/command_line.rb:23
(root) at /Users/smadhan/.rvm/gems/jruby-1.7.4/gems/jasmine-headless-webkit-0.8.4/bin/jasmine-headless-webkit:10
load at org/jruby/RubyKernel.java:1073
(root) at /Users/smadhan/.rvm/gems/jruby-1.7.4/bin/jasmine-headless-webkit:23
Does anyone know why?

It might be the wrong version of Rainbow installed in your gemset.
Try the following:
gem list|grep rainbow
If you have >2.0.0 version, you need to downgrade:
gem uninstall rainbow
gem install rainbow --version 1.99.2

The project repository says that it's dead, and that you should use Karma instead: https://github.com/johnbintz/jasmine-headless-webkit/commit/f7384d684ca8974bcadcf318427f07c4b66b3c68

Related

How can I solve this error and install cocoapods?

In my terminal I use:
sudo gem install cocoapods
My terminal gives the error shown below. How can I solve this? I have tried a few variations and I cannot get it to work.
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200518-1427-ajbhbt.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.12.2/gem_make.out
Agree with Vinayaka and Bryan you're missing some ruby header files and it looks like they're required. Not sure about your environment setup but it may help to just reinstall the latest Xcode from scratch.
Also, I've had some recent problems with Cocoapods installed via terminal. The terminal installs the latest build of Cocoapods. If you're looking for something stable then maybe try the Cocoapods app. It's clunky and it can't read pod files from the latest version of Cocoapods (so you'll have to regenerate any existing podfiles) but its easier to work with especially for those who prefer a graphical environment.
We need to install Xcode's developer tools. The easiest way to do this is through terminal .
xcode-select --install
Later, if there are any write permission issues, use the below code.
sudo gem install cocoapods -n /usr/local/bin/..
P.S: -n specifies the directory where binaries are located.
Please try with
brew install cocoapods

Fastlane "nokogiri requires Ruby version >= 2.3.0." Error

I finished this tutorial on Medium in order to integrate my Xcode project with SonarQube to have some metrics. Setup SonarQube - Swift. I was able to make it through the last step that is: running fastlane metrics on the terminal while being in the root of the project directory. But I get this error on step "slather".
nokogiri requires Ruby version >= 2.3.0., fastlane finished with errors:
I have also found that someone had a similar question here, but no answers:
Similar Question
If I run:
nicolas$ ruby --version
I get ruby version 2.6.3, which is higher than the required 2.3
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
Does anyone knows how to fix this, or got any hunches? Thanks in advance, I appreciate any help.
After digging around and trying several solutions, I finally solved this. What happened was that I initially installed Fastlane with this command:
brew cask install Fastlane
And it seems that it was using another version of ruby while I had a newer one. So I uninstalled it with:
brew cask uninstall Fastlane
And then I re-installed it with this command:
sudo gem install -n /usr/local/bin fastlane -NV
Because I was having problems with permissions and then all worked good.
References and other solutions:
Github thread
usr/local/bin

installing dmsf plugin in redmine

while installing dmsf plugins, I ran the following command:
bundle exec rake redmine:plugins:migrate RAILS_ENV="production"
Its throwing the following error:
rake aborted!
cannot load such file -- dav4rack
Is it due to my wrong setting of the gem file or something else? Can someone give me a clue?
Its problem for nokogiri gem version not support You have to upgrade nokogiri gem or downgrade mention in the gem file

getting load error while trying to use jira4r-jh gem in irb

I downloaded the jira4r-jh gem and tried to test it from irb, but as soon as I type
require 'jira4r-jh'
I get a load error complaining about a missing gem.
I am using ruby 1.8.7
figured it out!
the right way to do it:
gem 'jira4r-jh'
require 'jira4r/jira_tool'

Having trouble installing the PG gem

I'm trying this, as the docs say:
gem install pg --with-pg-config=/opt/local/lib/postgresql90/bin/pg_config
ERROR: While executing gem ... (OptionParser::InvalidOption)
But, that's obviously not working. Can anyone spot an error?
The example that you're linking to says this:
gem install -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
#-----------^^
Note the -- in there that you're not using. I suspect that gem is trying to parse the --with-pg-config as an option to gem rather than an option to the gem itself. Just a plain -- in an option list means "stop parsing options here" so try one of these:
gem install -- pg --with-pg-config=/opt/local/lib/postgresql90/bin/pg_config
gem install pg -- --with-pg-config=/opt/local/lib/postgresql90/bin/pg_config
One of those should keep gem from trying to interpret --with-pg-config as a gem option and get it down to the pg gem itself.
Not sure if the other answer works, but I thought I'd point out that the instructions here did work if you're using bundler to manage gems:
http://devblog.vworkapp.com/post/403869225/install-pg-gem-via-bundler-on-osx-snow-leopard
install postgres from Mac Ports
sudo port install postgres84
Include the postgres binaries in the PATH environment variable
export PATH=/opt/local/lib/postgresql84/bin:${PATH}
Then run bundle install with the all-important arch flag
env ARCHFLAGS="-arch x86_64" bundle install
Caveats: Your ARCHFLAGS may be something like i386 and not x86_64, depending on your local environment (and these instructions are obviously installing an older postgres -- I did sudo port install postgresql90).