LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-11-2022, 11:43 PM   #1
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,620
Blog Entries: 40

Rep: Reputation: Disabled
[Ruby / Gem] Too tired for rant. Again. Confused filemagic and ruby-filemagic


With a newer version of ruby comes the task to update the gems.
This is about the third time that I confuse these two gems filemagic (outdated and rails-related... sinatra, too, it seems) and ruby-filemagic (just what you expect).

Quote:
Fetching filemagic-0.4.0.0.gem
Successfully installed rack-1.6.13
Successfully installed concurrent-ruby-1.1.9
Successfully installed sprockets-3.7.2
Successfully installed tilt-2.0.10
Successfully installed rack-protection-1.5.5
Successfully installed sinatra-1.4.8
Successfully installed netrc-0.11.0
Successfully installed mime-types-2.99.3
Building native extensions. This could take a while...

Successfully installed unf_ext-0.0.8
Successfully installed unf-0.1.4
Successfully installed domain_name-0.5.20190701
Successfully installed http-cookie-1.0.4
Successfully installed rest-client-1.8.0
Successfully installed refile-0.6.2
Successfully installed jmespath-1.6.1
Successfully installed aws-eventstream-1.2.0
Successfully installed aws-sigv4-1.4.0
AWS SDK For Ruby V2 has been marked as deprecated. Please upgrade to AWS SDK For Ruby V3.
Successfully installed aws-sdk-core-2.11.632
AWS SDK For Ruby V2 has been marked as deprecated. Please upgrade to AWS SDK For Ruby V3.
Successfully installed aws-sdk-resources-2.11.632
AWS SDK For Ruby V2 has been marked as deprecated. Please upgrade to AWS SDK For Ruby V3.
Successfully installed aws-sdk-2.11.632
Successfully installed refile-s3-0.2.0
Successfully installed mini_magick-4.11.0
Successfully installed refile-mini_magick-0.2.0
Successfully installed thread_safe-0.3.6
Successfully installed tzinfo-1.2.9
Successfully installed i18n-0.9.5
Successfully installed activesupport-4.2.11.3
Successfully installed crass-1.0.6
Successfully installed loofah-2.14.0
Successfully installed rails-html-sanitizer-1.4.2
Successfully installed rails-deprecated_sanitizer-1.0.4
Successfully installed rails-dom-testing-1.0.9
Successfully installed rack-test-0.6.3
Successfully installed erubis-2.7.0
Successfully installed builder-3.2.4
Successfully installed actionview-4.2.11.3
Successfully installed actionpack-4.2.11.3
Successfully installed sprockets-rails-3.2.2
Successfully installed thor-1.2.1
Successfully installed railties-4.2.11.3
Successfully installed bundler-1.17.3
Successfully installed arel-6.0.4
Successfully installed activemodel-4.2.11.3
Successfully installed activerecord-4.2.11.3
Successfully installed globalid-0.4.2
Successfully installed activejob-4.2.11.3
Successfully installed actionmailer-4.2.11.3
Successfully installed rails-4.2.11.3
Successfully installed filemagic-0.4.0.0

(... all the documentation follows)
There you go again... I need a script.

Code:
for f in `cat list`; do sudo gem uninstall --force "$f"; done; sudo gem install ruby-filemagic
.

Edit: Thor? why thor..? Never mind.

Last edited by Michael Uplawski; 03-12-2022 at 01:38 AM.
 
Old 03-12-2022, 01:46 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,005

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
If memory serves, aren't your gems controlled by the Gemfile inside main directory?

To this end I would say you just need the correct gem name in that file.

If I have missed the point, please explain further?
 
Old 03-12-2022, 03:57 AM   #3
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,620

Original Poster
Blog Entries: 40

Rep: Reputation: Disabled
Quote:
Originally Posted by grail View Post
If memory serves, aren't your gems controlled by the Gemfile inside main directory?

To this end I would say you just need the correct gem name in that file.

If I have missed the point, please explain further?
You did miss nothing. But I have a few Ruby-things under continuous development and tend to make sure I have the gems *before* I need them. It would, of course, be a much bigger catastrophe if each user of a gem would have to download the dependencies by himself.

So, you are right. But my needs are different. Having to run the whole “program” each time for testing tiny changes is also no good practice.., although, in my case, these are small scripts and I could do it. It still feels dumb to have to run my own program only to ensure that missing dependencies are fetched...

... on second thought. You can invent new gems and try to get them... maybe a server responds...

Code:
require 'get_me_my_helicopter_today'
require 'sunshine_all_day_long'

Last edited by Michael Uplawski; 03-12-2022 at 04:32 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't install 'rmagick' Ruby gem... ahmadj Slackware 4 01-04-2011 04:23 AM
[SOLVED] Installing Ruby on Rails -- "gem update --system is disabled on Debian". bartonski Debian 2 08-23-2009 09:17 PM
Error while installing MySQL Ruby gem skie_knite007 Programming 5 07-12-2009 06:57 PM
Rant Rant Rant Seventh General 19 01-06-2007 11:09 PM
rant, rant, rant (dselect) fenderman11111 Debian 2 07-06-2004 06:03 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration