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
Related
Does anyone know what's happening here?
root#ip-172-31-5-114:/home/bitnami/htdocs/kicksharer/kickscraper# gem install rails
Successfully installed rails-5.0.0.1
Parsing documentation for rails-5.0.0.1
Done installing documentation for rails after 0 seconds
1 gem installed
root#ip-172-31-5-114:/home/bitnami/htdocs/kicksharer/kickscraper# bundle show rails-5.0.0.1
Could not find gem 'rails-5.0.0.1'.
Any suggestions for troubleshooting would be really appreciated.
When you gem install rails it installs it on your system. You need to make sure rails is specified in your gem file and then bundle install in order to install those gems in the bundle. (It should use the already installed gems on your system)
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.
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.
I have had a lot of difficulty installing Gems into my Rails 4 Apps that I have built. For example, I have recently had issues with these two Gems:
Ckeditor:
https://github.com/galetahub/ckeditor
Twitter Bootstrap 3:
https://github.com/twbs/bootstrap-sass
I have no idea what I am doing wrong, in the slightest. I include the gems in my Gem file (gem 'ckeditor_rails'), and then I run 'bundle install'. However, whenever I provide my includes in my application.js (example: '//= require ckeditor/init'), my app yells at me and tells me that it cannot resolve the file. When I check why, its because no file was ever downloaded. Even though the gem installed with no errors. I have got to think I am doing something wrong. Any advice?
Before installing gem, first noted if there is any dependency gem. if the gem having dependency gem means you must install it first. and you may edit in your project/gem file gem 'ckeditor' and gem 'bootstrap-sass' and then run the server.
I'm trying to create a RoR web application that allows people to connect to their accounts to google calendar.
I found a gem called gcal4ruby that seemed to do the right things based on looking at sample code and its documentation.
I ran gem install and the cmd claimed the installation was ok.
However, when I added the gem to my gemfile then try to run the server again I get:
Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources
Try running 'bundle install'.
Then I tried bundle install which basically gets me the message above and a line:
Fetching source index for http://rubygems.org/
Could not find 'gcal4ruby (= 0.0.5, runtime)' in any of the gem sources
Yet when I type in "gem list -d g", gcal4ruby (0.5.5) appears on the list.
I've tried adding in requires and includes but that just gets me uninitialized constant errors.
Other details that may be relevant:
ruby 1.8.7
rails 3.0.1
gem check --alien returns:
mysql-2.8.1-x86-mingw32 has 1 problems
.require_paths:
Extra file
*Note: This doesn't seem to negatively impact me when I'm doing anything though.
If possible, please supply tutorials/sites with samples of working code.
Cheers,
Zigu
Could you post your gemfile please?
I'm guessing your Gemfile reads
gem 'gcal4ruby', '0.0.5'
which means it will only look for that specific verison. So there are two ways to fix this.
Change it to minimum version syntax
gem 'gcal4ruby', '>= 0.0.5'
Change to correct specific gem version
gem 'gcal4ruby', '0.5.5'
Hope that helps