ruby version is 2.1.0 and rails version is 4.1.1
my gem file got like below
gem 'debugger'
when i run command bundle install, i get error like below:
##
An error occurred while installing debugger (1.6.8), and Bundler cannot continue.
Make sure that gem install debugger -v '1.6.8' succeeds before bundling.
##
seeking suggestion to solve the issue.
debugger isn't compatible with Ruby 2 and above, it's a known issue.
https://github.com/cldwalker/debugger/issues/125#issuecomment-43353446
The author recommends using byebug or debugger2 instead.
This Worked for me:
Please replace
gem 'pry-debugger'
with
gem 'pry-byebug'
Thanks!
Debugger is not fully supported for Ruby 2.x.x.
Issue#118 is popular issue which addresses the same. Though it mentions that debugger 1.6.6 must be supported by Ruby 2.1.1, the users are still encountering the similar errors as you are.
Also, this is especially mentioned in their known issues.
You can try to follow that discussion to troubleshoot your problem.
Additionally, this may help:
rm Gemfile.lock
gem install debugger-ruby_core_source
gem update
bundle install
The other solution in issue discusses the possibility of updating Ruby binary.
If nothing works, and if you can possibly change the ruby/rails versions, I can suggest my current combination:
ruby 2.0.0-p195
rails 4.0.0
They work perfectly fine with debugger gem.
debugger gem doesn't work with Ruby 2.1+. Instead try byebug.
Related
I am trying to create new demo rails program, as guide in my book as this command
rails new demo
then it gave me this error
https://imgur.com/rUSzO4B
It said that my problem is
Could not find gem sqlite3 <> 1.4 x86-mingw32 in any of the gem sources listed in your Gem file
and I must run
bundle install
to solve it
I ran bundle install , but nothing changed.
I know my question maybe too easy to solve, but I am very stuck with this, could you please give me some ideas?
From the documentation of the bootsnap gem in rails: "This gem works on macOS and Linux." See: https://github.com/Shopify/bootsnap
They seem to have found a workaround here:
How can I properly install bootsnap on windows
Add or change to gem 'bootsnap', '=1.4.1', require: false to your project Gemfile
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")
I've generated the app with "rails new" and switched to that directory but when I try to use "bundle install" I get
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot
continue.
Make sure that gem install debug_inspector -v '0.0.2' succeeds before
bundling.
any suggestions?
I had the same problem with my rails application. I'm running with JRuby on my Windows machine and this is a common problem for Windows. I had to find the gem which included that gem as a dependency and remove it from my gem file.
In my case, there was a gem causing this name : gem 'web-console', '2.0.0.beta3' (probably an old version of the gem since it's a 1 year old project).
You probably need to comment some gem and try to bundle until it works.
If the gem is essential to the project, you will have to find a way to compile the gem for windows.
It may exist a way to check a tree of dependency to speed up the process.
This is a common error in older versions of ruby. Updating ruby version to 2.1.0 or later will fix this issue.
I am using rails on my local host and have recently been confronted with the following message.
Warning: You're using Rubygems 1.8.23 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
Sounds fair enough, however when I run the suggested command, it hangs on installing the cairo gem with the following message.
Cached gem for cairo-1.12.8 not found, attempting to fetch...
ERROR: While executing gem ... (Gem::Exception)
Cannot load gem at [/usr/share/rubygems-integration/1.9.1/cache/cairo-1.12.8.gem] in /home/me/
What might be going on here?
You need to update your rubygems to the 2.1.0 or newer versions. The newest version is currently 2.4.5 it was updated Dec. 3rd 2014. Try this link to update. https://rubygems.org/gems/rubygems-update
Hi all I ended up finding a post that recommended I just reinstall ruby again. Seeing no other choice I did a rvm uninstall ruby then a rvm install ruby and set everything else back up and it went well. Unsatisfying but true :-P
I am having a problem getting an old Ruby on Rails 2 app that hasn't worked in a year to work.
I'm trying to run rake test:functionals in the root of my project directory, but am getting undefined method 'name' for "SystemTimer":String.
I've pasted everything that I believe relevant to the problem here:
http://pastebin.com/NgBvystZ
Also, when I run rake itself, I get
Errors running test:units!
Not sure how to debug that.
I have copied and pasted everything that I think would be useful to understanding this problem. Your time is greatly appreciated. Thank you.
This is an incompatibility between versions of RubyGems greater than 1.3.7 and versions of Rails less than 2.3.12. There are a few ways to solve this.
Use Bundler
Bundler is easy to install, fixes this problem, and has a number of other advantages as well. I highly recommend it.
Upgrade to Rails 2.3.12 or higher
Rails 2.3.12 fixed compatibility issues with RubyGems 1.8.5 (see release report).
Downgrade to RubyGems 1.3.7
I would not recommended this unless you have no other choice. Use this command: gem update --system 1.3.7. Also, version 1.7.2 has partial compatibility (it will run, but freezing gems will fail and there are likely other issues).
I chanced upon this thread, because I got the following error when migrating some Radiant 0.9.1 installations to a new server:
undefined method `name' for "RedCloth":String
(3) The compromising solution: I haven't tested this personally, but I hear that rails 2.3 with bundler is compatible with the latest rubygems. If you're interested in this solution, see http://gembundler.com/rails23.html for getting bundler to work under rails 2.3.
For me solution 3 was the only option, since we had other apps needing the latest rubygems on the system.
Just install bundler and follow thes steps on this page:
http://gembundler.com/rails23.html
And put this in a file called "Gemfile" in the app root:
source :gemcutter
gem "radiant", "0.9.1"
gem "sanitize"
gem "fastercsv"
gem "rmagick"
gem "rack", "~> 1.1.0"
gem "rake", ">= 0.8.3"
gem "RedCloth", ">= 4.0.0"
gem "will_paginate", "~> 2.3.11"
gem "mysql"
This is just my example. Start with only the first 2 lines, run bundle update and reload the page to see what else you might be missing.
Thank you Ben!