Gem install error (gem install sass) - ruby-on-rails

I am using my root account for terminal:
I installed ruby (yum install ruby), and when tryng to install sass or other gems it gives me this error:
[root#ve555 /]# ruby -v
ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
[root#ve555 /]# gem install sass
Successfully installed sass-3.4.22
/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- json/pure (LoadError)
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/json-1.7.7/lib/json.rb:60:in `rescue in <module:JSON>'
from /usr/share/gems/gems/json-1.7.7/lib/json.rb:57:in `<module:JSON>'
from /usr/share/gems/gems/json-1.7.7/lib/json.rb:54:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/text.rb:16:in `<top (required)>'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/code_object.rb:28:in `<class:CodeObject>'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/code_object.rb:26:in `<top (required)>'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/generator/markup.rb:59:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/generator/darkfish.rb:6:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rdoc.rb:563:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:64:in `load_rdoc'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:229:in `setup'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:142:in `generate'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:54:in `block in generation_hook'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:53:in `each'
from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:53:in `generation_hook'
from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:189:in `call'
from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:189:in `block in install'
from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:188:in `each'
from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:188:in `install'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:205:in `install_gem'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:255:in `block in install_gems'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:251:in `each'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:251:in `install_gems'
from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:158:in `execute'
from /usr/local/share/ruby/site_ruby/rubygems/command.rb:310:in `invoke_with_build_args'
from /usr/local/share/ruby/site_ruby/rubygems/command_manager.rb:169:in `process_args'
from /usr/local/share/ruby/site_ruby/rubygems/command_manager.rb:139:in `run'
from /usr/local/share/ruby/site_ruby/rubygems/gem_runner.rb:55:in `run'
from /usr/bin/gem:21:in `<main>'
Can someone help me to fix this?

Have you tried: gem install json_pure before gem install sass ?
(This supposed to be in comment section, but my reputation is insufficient)

Related

I'm having problems with libv8 when running rails server on Mac M2 ventura

I had some problems installing ruby ​​2.6.6 in my terminal, and one of them was with libv8 and therubyracer. I was able to solve the problem by installing rosetta 2 and installing the gems as follows
alias ibrew="arch -arm64 brew"
export PATH="/usr/local/homebrew/bin:$PATH"
gem install libv8 -- --with-system-v8
gem install therubyracer -- --with-v8-dir=$(ibrew --prefix v8#3.15)
bundle
But after the bundle ran correctly, another problem appeared that I couldn't solve...
/Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/therubyracer-0.12.3/lib/v8.rb:4:in `require': dlopen(/Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/therubyracer-0.12.3/lib/v8/init.bundle, 0x0009): symbol not found in flat namespace '__ZN2v810ScriptData10PreCompileEPKci' - /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/therubyracer-0.12.3/lib/v8/init.bundle (LoadError)
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/therubyracer-0.12.3/lib/v8.rb:4:in `<top (required)>'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/therubyracer-0.12.3/lib/therubyracer.rb:1:in `require'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/therubyracer-0.12.3/lib/therubyracer.rb:1:in `<top (required)>'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `require'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `each'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:76:in `block in require'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `each'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:65:in `require'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
from /Users/my_user/projetos/autocommerce/config/application.rb:18:in `<top (required)>'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/command/actions.rb:22:in `require'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/command/actions.rb:22:in `require_application!'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/commands/console/console_command.rb:95:in `perform'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/command/base.rb:69:in `perform'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/command.rb:46:in `invoke'
from /Users/my_user/.rbenv/versions/2.6.8/lib/ruby/gems/2.6.0/gems/railties-5.2.5/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I tried reinstall the gems and the project but nothing works...

rails test, rails server and others not working

i have been following railstutorial.org in learning rails, and right now, i don't know where my error is from, but rails test isn't testing and rails server isn't coming on
C:\Sites\sample_app>rails test
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError)
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
from C:/Sites/sample_app/config/application.rb:7:in `<top (required)>'
from C:/Sites/sample_app/config/environment.rb:2:in `require_relative'
from C:/Sites/sample_app/config/environment.rb:2:in `<top (required)>'
from C:/Sites/sample_app/test/test_helper.rb:1:in `require'
from C:/Sites/sample_app/test/test_helper.rb:1:in `<top (required)>'
from C:/Sites/sample_app/test/controllers/static_pages_controller_test.rb:1:in `require'
from C:/Sites/sample_app/test/controllers/static_pages_controller_test.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:50:in `require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:50:in `block in load_tests'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:50:in `each'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:50:in `load_tests'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/test_unit/runner.rb:39:in `run'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/test/test_command.rb:38:in `perform'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
here's the error code for the rails s
C:\Sites\sample_app>rails s
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError)
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x86-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
from C:/Sites/sample_app/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `block in perform'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `tap'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `perform'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I don't know where it's from
please if you would like to see any page, just tell me, and i'll upload it
First of all comment out # gem bcrypt, '3.1.11' and run bundle install.After that uninstall the gem with gem uninstall bcrypt.Then re-install gem install bcrypt --platform=ruby.The important part, un-comment gem 'bcrypt', '~> 3.1.11', platforms: [:ruby, :x64_mingw, :mingw] and then bundle install.Thats it.Note the mingw part at the end.This should be the key.
source
a) gem uninstall bcrypt-ruby
b) In your gemfile, add
gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'
c) bundle install
This works on Windows
Good luck

Error while running bundle install and rails server command

Whenever I try to run the above mention command it shows the following error.
This is the first step when i try to run the simple bundle command: Bundle install
/home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/digest.rb:16:in `const_missing': library not found for class Digest::MD5 -- digest/md5 (LoadError)
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/source/rubygems/remote.rb:26:in `cache_slug'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/fetcher/compact_index.rb:107:in `cache_path'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/fetcher/compact_index.rb:83:in `compact_index_client'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/cli.rb:646:in `warn_on_outdated_bundler'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/cli.rb:24:in `block in dispatch'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor.rb:366:in `dispatch'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/cli.rb:22:in `dispatch'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/cli.rb:13:in `start'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/exe/bundle:30:in `block in <top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/exe/bundle:22:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
from /home/mifi/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
And when i found the above error i try to run the server command for the rails but it doesn't work out for me.
rails server
/home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': libcrypto.so.1.0.2: cannot open shared object file: No such file or directory - /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/x86_64-linux/digest/sha1.so (LoadError)
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/source/git.rb:4:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/lockfile_parser.rb:122:in `<class:LockfileParser>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/lockfile_parser.rb:14:in `<module:Bundler>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/lockfile_parser.rb:13:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/definition.rb:2:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler.rb:129:in `definition'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler.rb:95:in `setup'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/bundler-1.15.3/lib/bundler/setup.rb:9:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/mifi/huginn/config/boot.rb:6:in `<top (required)>'
from bin/rails:8:in `require_relative'
from bin/rails:8:in `<main>'
and same for the rails -v command:
/home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:120:in `require': libcrypto.so.1.0.2: cannot open shared object file: No such file or directory - /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/x86_64-linux/digest/md5.so (LoadError)
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:120:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/generators/app_base.rb:2:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/generators/rails/app/app_generator.rb:1:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/commands/application/application_command.rb:2:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/command/behavior.rb:82:in `block (2 levels) in lookup'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/command/behavior.rb:78:in `each'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/command/behavior.rb:78:in `block in lookup'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/command/behavior.rb:77:in `each'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/command/behavior.rb:77:in `lookup'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/command.rb:68:in `find_by_namespace'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/command.rb:42:in `invoke'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/lib/rails/cli.rb:16:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/mifi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.1.2/exe/rails:9:in `<top (required)>'
from /home/mifi/.rbenv/versions/2.4.0/bin/rails:22:in `load'
from /home/mifi/.rbenv/versions/2.4.0/bin/rails:22:in `<main>'
Is there anything I am missing out.
I got this same error, and it seems like that version of ruby got corrupted.
> bundle install
~/.rbenv/versions/2.5.6/lib/ruby/2.5.0/digest.rb:16:in `const_missing':
library not found for class Digest::SHA1 -- digest/sha1 (LoadError)
> ruby -r digest/sha1 -e 'p Digest::MD5'
...
Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
...
Using a mac with rbenv, I fixed it as follows:
> ruby -v
ruby 2.5.6p201 (2019-08-28 revision 67796) [x86_64-darwin18]
> rbenv install 2.5.6
...
continue with installation? (y/N) y
...
Installed ruby-2.5.6 to ~/.rbenv/versions/2.5.6
> ruby -r digest/sha1 -e 'p Digest::MD5'
Digest::MD5
bundle install worked after that.
Note: I got a lot of messages about running gem pristine, so just in case, I also ran:
> gem pristine --all
One of your underlying libraries is not installed. Run
sudo apt-get install libssl-dev libssl
Assuming you are on ubuntu linux.

Installing Gem therubyracer on windows 7

Guys today I was trying to install old project "developed by rails3" on my Pc so after type the commands
bundle install
rails s
It gave me the error
Please install gem 'therubyracer' to use Less.
then I installed the Gem therubyracer by doing this steps
first activated my code encoding
C:\>chcp 1252
Active code page: 1252
then downloaded the Gem files for windows from this page
https://github.com/hiranpeiris/therubyracer_for_windows
and typed the commands
C:\>cd therubyracer_for_windows-master
C:\therubyracer_for_windows-master>gem install "therubyracer-0.11.0beta1-x86-min
gw32.gem"
Successfully installed therubyracer-0.11.0beta1-x86-mingw32
Parsing documentation for therubyracer-0.11.0beta1-x86-mingw32
Done installing documentation for therubyracer after 3 seconds
1 gem installed
C:\therubyracer_for_windows-master>cd..
C:\>cd sites
C:\Sites>cd siteFolder
C:\Sites>cd siteFolder> bundle install
C:\Sites\siteFolder>rails s
then I found my self got the same error !!!
why ?
the gem now installed , why I got the same error ???
[WARNING] Please install gem 'therubyracer' to use Less.
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib/less/java_sc
ript/v8_context.rb:2:in `require': cannot load such file -- v8 (LoadError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less/java_script/v8_context.rb:2:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less/java_script.rb:9:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less/java_script.rb:9:in `default_context_wrapper'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less/java_script.rb:17:in `context_wrapper'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less/loader.rb:13:in `initialize'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less.rb:14:in `new'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less.rb:14:in `<module:Less>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less.rb:9:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.5
.0/lib/less/rails.rb:6:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.5
.0/lib/less/rails.rb:6:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.5
.0/lib/less-rails.rb:1:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.5
.0/lib/less-rails.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:76:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:72:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:72:in `block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:61:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:61:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler.rb:132:in `require'
from C:/Sites/siteFolder/config/application.rb:13:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/lib/rails/commands.rb:53:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/lib/rails/commands.rb:53:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/lib/rails/commands.rb:50:in `tap'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
C:\Sites\siteFolder>

No Such File to Load -- rest_client (Rails 3)

When I do thin start, this is the error I get:
$ thin start
>> Using rack adapter
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require': no such file to load -- rest_client (LoadError)
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require'
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /.rvm/gems/ruby-1.9.2-p0/gems/stripe-1.5.13/lib/stripe.rb:9:in `<top (required)>'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `block (2 levels) in require'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `block in require'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require'
from /.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler.rb:112:in `require'
from /app/config/application.rb:7:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /app/config/environment.rb:2:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /app/config.ru:3:in `block in <main>'
from /.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
from /.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
from /app/config.ru:1:in `new'
from /app/config.ru:1:in `<main>'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:36:in `eval'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:36:in `load'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:45:in `for'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/controllers/controller.rb:169:in `load_adapter'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/controllers/controller.rb:73:in `start'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
from /.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/bin/thin:6:in `<top (required)>'
from /.rvm/gems/ruby-1.9.2-p0/bin/thin:19:in `load'
from /.rvm/gems/ruby-1.9.2-p0/bin/thin:19:in `<main>'
Anyone have any thoughts?
Edit: I tried running sudo gem install rest-client, and even though that gem installed, I am still getting the error when I run thin start.
I had to declare gem 'rest-client' explicitly in my Gemfile for it to work.
It was an issue with the Stripe gem, that needs rest-client as a dependency.

Resources