Questions tagged [gemfile]
Gemfile - A format for describing gem dependencies for Ruby programs. A Gemfile describes the gem dependencies required to execute associated Ruby code.
692
questions
0
votes
1
answer
13
views
How to make my ruby gem install native apt packages automatically during its installation?
I'm building my own ruby gem, let's call it my-gem, which depends on some system package, for example gpsbabel. It expects to be able to call gpsbabel command using the shell.
On Ubuntu, before ...
0
votes
0
answers
36
views
Could not find json-2.6.2, aws-partitions-1.594.0, unf_ext-0.0.8.2 in any of the sources
when I execute: bundle exec fastlane
I get: Could not find json-2.6.2, aws-partitions-1.594.0, unf_ext-0.0.8.2 in any of the sources
Run bundle install to install missing gems.
although I am using the ...
0
votes
1
answer
38
views
Installing rbtrace 0.4.14 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension
This happened to me several times while trying to install Discourse:
Cannot install rbtrace with native extensions.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
*** extconf.rb ...
0
votes
0
answers
15
views
bundler is complaining about stringio, but I don't even have that in my Gemfile.lock
I’m building a Rails 6.1.4.4 app and trying to start my unicorn server (using a script that calls unicorn on /usr/local/rvm/wrappers/cfs-web/unicorn) and I keep getting this error
/usr/local/rvm/gems/...
0
votes
0
answers
11
views
couldn't find file 'owl.theme.default' with type 'text/css' error in rails 5.1.4
im getting the below error.
Sprockets::FileNotFound at /
couldn't find file 'owl.theme.default' with type 'text/css'
Checked in these paths:
/home/xyz/abc/proj1/app/assets/config
/home/xyz/abc/...
0
votes
0
answers
20
views
How to add dependencies to Rails engine's dummy app?
I would like to add a few dependencies in my test/dummy app so that I can do integration test of my engine. I added a test/dummy/Gemfile and put the dependencies on it:
gem 'devise'
gem '...
0
votes
0
answers
71
views
Unable to run flutter app in Android Studio on iOS simulator. No problem on Android tablet
Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...
Warning: CocoaPods is installed but broken. Skipping pod install.
You appear to have CocoaPods installed but it is not working.
...
0
votes
1
answer
156
views
Could not find gem 'puma (~> 5.0)' in locally installed gems
After running bundler in the home directory of my Rails 5 app, I am unable to start rails server. As a note, I cannot locate a local installation of the puma gem, 'puma (~> 5.0)', which I thought ...
0
votes
0
answers
23
views
Upgrade dry gems from very old versions to newer ones (for ruby 2.7 compatibility)
My company is currently trying to update our porject base to ruby 2.7 to prepare for a further update to ruby 3.x.
All our projects are currently running with ruby 2.5.
A lot of them were easy to ...
3
votes
3
answers
565
views
Cannot add platform to Gemfile.lock using bundle lock
I am trying to push a project to Heroku for the first time using git push heroku master. However, I end up getting the following error:
Your bundle only supports platforms ["arm64-darwin-21"...
0
votes
0
answers
17
views
Ruby Dependencies For Building Gems
I am working towards a Ruby gem template for Jekyll plugins. I want to understand how to properly express the different types of dependencies potentially in play.
This question would like to avoid any ...
1
vote
2
answers
47
views
In a Rails Gemfile, how do I reference a commit from a PR?
We need to patch rescue, and evidently someone has already created a PR here — https://github.com/resque/resque-web/pull/157/commits/0972517d6e42eeb096555a17346937d6df100d82
However, I’m not sure how ...
0
votes
1
answer
133
views
What exactly is the 'platforms' argument for gem in Gemfile?
To start with basics, I see things like this in the Gemfile
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
...
2
votes
1
answer
71
views
Why is bundle adding an extra 0 at the end of my Ruby version?
I'm trying to install dependencies by running bundle install.
My Gemfile specifies Ruby version as follows:
source 'https://rubygems.org'
ruby '2.6.6'
gem 'cocoapods', '1.10.2'
...
However when I ...
2
votes
2
answers
88
views
In Rails 6, where do I place moneky patch code so that it gets run before the Gem code?
I’m using Ruby 3.0.2 and Rails 6.1.4.4. I have installed a gem, octoshark v 0.3.0, that doesn’t play well with Ruby 3. The gem file is
~/.rvm/gems/ruby-3.0.2@cfs-web/gems/octoshark-0.3.0/lib/...
0
votes
1
answer
56
views
Install Jekyll but says: couldn't locate gemfile or bundle/directory
I just installed Jekyll, but when I type bundle exec jekyll serve, it couldn't locate Gemfile or .bundle/ directory.
What should I do?
2
votes
1
answer
100
views
Ruby On Rails - man in the middle attack when a gem uses in its Gemfile HTTP source?
I'm running a security scanner against an app I'm developing and it's rising red alert, maximum security thread for the gem rotr which uses in its Gemfile source with HTTP protocol revealing a ...
0
votes
0
answers
108
views
Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile
Error setting up my database when trying to clone this repo (https://github.com/ssaffa38/prelaunchr) and running it on my local server. Where I'm getting is stuck is where it is asking to setup local ...
0
votes
1
answer
33
views
Gemfire - How to restrict/limit OQL queries for a region
Some users are executing OQL for regions that are triggering out of memory errors in a huge region. Sorting a query alone triggers an out of memory error.
Is there any configuration to weather ...
0
votes
1
answer
47
views
Why doesn't "gem install bundler" upgrade my bundler?
I’m trying to upgrade from Rails 4.2 to Rails 6. I have this in my Gemfile
fail "run 'gem install bundler' to update your bundler version" unless Bundler::VERSION >= '2.0.0'
source '...
0
votes
1
answer
227
views
Can I rebuild a Gemfile from a Gemfile.lock file?
I would like to replicate an older app, but bundle install fails since Gemfile became outdated and does not catch compatible versions anymore. I guess I can try correct Gemfile by err and trial, yet ...
0
votes
0
answers
143
views
How do I force my "bundle install" to select the proper version of nokogiri compatible with my existing Ruby version?
I’m running the following version of Ruby, within an Ubuntu 16.04 virtual container (vagrant) …
$ ruby -v
ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux]
When I try and install my gems, I ...
0
votes
1
answer
108
views
Docker with bundle install doesn't behave same on my VPS and Mac
My Dockerfile
FROM ruby:2.6.3-alpine
ENV BUNDLER_VERSION=2.2.6
RUN apk add --update --no-cache \
binutils-gold \
build-base \
curl \
file \
g++ \
gcc \
git \...
1
vote
1
answer
767
views
bundle install does not respect Gemfile.lock
I faced some issues with bundle install.
When we run 'bundle install' , One of the dependency gem in Gemfile.lock is get auto upgraded.
As per theory, "bundle install" will look the Gemfile....
2
votes
0
answers
729
views
An error occurred while installing openssl (2.2.0), and Bundler cannot continue while cmd bundle install
I'm having a error
while
bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/vivek/.rvm/gems/ruby-2.6.6/gems/openssl-2.2.0/ext/openssl
/usr/...
1
vote
2
answers
305
views
Trying to bump rails version from 4.2.11 to 5.0
The current state of my project is that I'm using rails 4.2.11 and ruby 2.3.0. I would like to start using rails 5.0 and keep the ruby version because as far as I understood rails 5.0 is compatible ...
0
votes
1
answer
385
views
Bundler could not find compatible versions
I have multiple gems failing on my app. My bundler is not able to find compatible versions for all. I also do not have a 'Gemfile.lock' and it does not get created on bundle install. As follows:
...
1
vote
1
answer
92
views
Parsing direct and indirect Gems of Gemfile.lock file [duplicate]
I'm trying to parse the following Gemfile.lock to include ALL Gems (direct and indirect dependencies) out of GEM specs:
GEM
remote: http://rubygems.org/
specs:
coderay (1.1.3)
domain_name (...
0
votes
1
answer
70
views
WKHTMLTOPDF PDF could not be generated
My rails app is working fine in many aspects but when I try to generate pdf on a production server, I get this error below. On my local computer, it's working fine. How can I go about this?.
Command ...
0
votes
1
answer
456
views
gem install and bundle install fails to install sqlite3
I'm new to Rails, and I'm learning it from The Ruby on Rails Tutorial.
The bundle install command shows this error when I use gem 'sqlite3' in Gemfile;
An error occurred while installing sqlite3 (...
1
vote
1
answer
385
views
how update Rails ruby minor version
If a Rails 6 Gemfile includes ruby "~> 3.0" and the current Ruby version in the project is 3.0.1, how does one upgrade Ruby to the highest current minor release (3.0.2 at this time) ...
1
vote
0
answers
65
views
Bundler: fatal: Could not parse object when gem uses github option
When I do bundle install I get this:
fatal: Could not parse object 'f3412a7ffb015df7ced6aa662a53a53e081611a0'.
Git error: command `git reset --hard f3412a7ffb015df7ced6aa662a53a53e081611a0` in ...
-1
votes
1
answer
484
views
updating to rails 6, but "activerecord-session_store (~> 2.0) was resolved to 2.0.0, which depends on actionpack (>= 5.2.4.1)"
I ran bundle update rails and got this. I'm stumped. If activerecord-session_store 2.0 depends on a version of actionpack between 5.2.4.1 and above, and if actionpack is a dependency of Rails 6, ...
0
votes
1
answer
136
views
sudo msfconsole [*] Bundler failed to load and returned this error: help me
┌─[alzaeem@Parrot]─[~/tools]
└──╼ $sudo msfconsole
[*] Bundler failed to load and returned this error:
'You have already activated bundler 2.1.4, but your Gemfile requires bundler 2.2.3. Since bundler ...
2
votes
1
answer
114
views
Image not found for patron gem when running rails
I'm getting the following error when trying to run some rails commands in my app.
I upgraded ruby 2.6.6 to 2.7.3 (I use rbenv) and bundle from 2.0.2 to 2.1.4, by doing
brew update && brew ...
0
votes
0
answers
312
views
How to run 'bundle exec rake -P' "using the production group of your Gemfile"?
I see this dreaded message;
remote: !
remote: ! Could not detect rake tasks
remote: ! ensure you can run `$ bundle exec rake -P` against your app
remote: ! and using the production ...
0
votes
1
answer
223
views
Rails Upgrade 4.2 -> 5 - Bundler not able to resolve exact gem version
I'm getting this error in upgrading various gems, as I'm trying to move from 4.2.11.1 to 5.0.1. Sample error for actionpack:
Bundler could not find compatible versions for gem "actionpack":
...
0
votes
1
answer
33
views
When installing a gem in a local project directory, how do I figure out what the proper gem file path should be?
I'm using Ruby 2.6 and Rail 5. I want to install the following gem
$ gem install ffi -v '1.9.18' -- --with-cflags="-Wno-error=implicit-function-declaration"
Fetching ffi-1.9.18.gem
ERROR: ...
0
votes
2
answers
185
views
'bundle install' keeps installing gem sqlite3 version 1.4.2 even if not in Gemfile
I need sqlite3 v1.3.9 gem installed for my app, so I add this line to the Gemfile:
gem 'sqlite3', '= 1.3.9'
However, when I run 'bundle install', it installs v1.4.2 of that gem.
I modified the above ...
0
votes
1
answer
129
views
How to specify indirect gem dependency version in rails Gemfile
In my Gemfile, i have:
gem 'msgpack_rails'
gem 'google-authenticator-rails'
.. etc
Inside Gemfile.lock i see:
google-authenticator-rails (2.0.0)
actionpack
activerecord
google-qr
...
0
votes
0
answers
308
views
`rails new` not using ruby version from rbenv and from `ruby -v` while rails s throws 'Your Ruby version is 2.6.3, but your Gemfile specified 2.7.2'
I am using rbenv for ruby version management and I just generated a new project with rails new ... I realized that my gemfile und .ruby-version were using 2.6.3 so I changed to 2.7.2, since it is my ...
1
vote
0
answers
671
views
How the gemfile will be maintained, as a common one for iOS and Android in react-native app
How the Gemfile will be maintained, as a common one for iOS and Android or not. I am using react-native app
I have setup fastlane there it crated a Gemfile and it is inside the android folder.
Then an ...
0
votes
0
answers
274
views
ArgumentError: missing required workbook file
I am trying to read an Excel file in Rails using Roo.
file = Roo::Spreadsheet.open(path, extension: :xlsx)
On this line I'm getting this error ArgumentError: missing required workbook file from /home/...
3
votes
2
answers
500
views
Rails: Handling different gem versions for different operating systems
My Rails 6 project uses some gems that install the grpc gem. In my Gemfile.lock, the gem is installed like this:
grpc (1.32.0)
google-protobuf (~> 3.13)
googleapis-common-protos-types (~> 1....
0
votes
0
answers
155
views
PG gem on rubygems has 3 items with the same version
I am trying to upgrade my rails app from Ruby 2.7.2 to 3.0.0.
However, I need to upgrade my PG gem to version 1.2.3.
When I look at Rubygems page for pg there are 3 downloads all with the same version ...
1
vote
2
answers
109
views
How do I parse the Gemfile to find internal gems not inside a source block?
For the sake of security internal Ruby gems in the Gemfile should always be referenced inside a source block so it never tries to fetch them from rubygems.org. I'd like to automate finding where ...
-1
votes
1
answer
25
views
Errors on generating controllers [closed]
Here is the error when controller is generated
Here is my Gem-file code
Help me to fix out this error
0
votes
1
answer
33
views
gem rails from Github not updating
I have this in my Gemfile :
gem "rails", github: "rails/rails"
But when I do bundle update, it is not fetching the latest commit
1
vote
0
answers
120
views
New version of gem not reflecting in gemfile.lock of an engine
I'm updating the rails version of my application from '4.2' to '6.0'. There are multiple engines in my application. The new rails version is not reflecting in the gemfile.lock of engine which is ...
0
votes
0
answers
254
views
How to run `bundle check` and `bundle install` from inside a script without using the command line?
I can run the following two commands from my bash shell -
bundle check --gemfile=/path/to/some/Gemfile
bundle install --gemfile=/path/to/some/Gemfile
How do I run these from inside a Ruby script ...