I'm trying to install Webpacker to be able to launch a Yarn server. I'm on Rails 5 and the gem is installed.
When I run
bundle exec rails webpacker:install
I get:
>> rails aborted!
Don't know how to build task 'webpacker:install' (see --tasks)
bin/rails:15:in `require'
bin/rails:15:in `<main>'
(See full trace by running task with --trace)
The command doesn't seem to exist.
install the rails/webpacker gem as from the documentation I am quoting
Installation
You can either add Webpacker during setup of a new Rails 5.1+ application using new --webpack option:
Available Rails 5.1+
rails new myapp --webpack
Or add it to your Gemfile:
Gemfile
gem 'webpacker', '~> 3.0'
OR if you prefer to use master
gem 'webpacker', git: 'https://github.com/rails/webpacker.git'
and finally, run following to install Webpacker:
bundle
bundle exec rails webpacker:install
OR (on rails version < 5.0)
bundle exec rake webpacker:install
First, add the following to the gemfile:
gem "webpacker", "~> 3"
Then, bundle install:
bundle exec rails webpacker:install
I was trying to install webpacker and, for me, the solution was a bit different from those listed here.
I was trying gem install webpacker, but it doesn't change the Gemfile.
Then I searched for why it doesn't change, and to make it work I had to use:
bundle add webpacker
After that I used:
rails webpacker:install
Are you sure webpacker is installed correctly?
Maybe there is an issue with your use of bundle exec try running without it. You can also try running with the --tasks flag to verify if the webpacker tasks are available to use.
I tried deploying my rails application using Capistrano but after the deployment has finished, I get the following error:
Could not find rake-10.5.0 in any of the sources
I have tried adding Gem 'rake' to my Gemfile and redeploying and have tried setting the rvm path.
1) gem install bundler
2) bundle install
try to run the code after these 2 commands
I recently had to add two gems to my gem file. When I added them to my gemfile, I pushed directly to my production server.
I SSH'd into my production server, and tried running bundle install. This is the error I go:
>> bundle install
.........
>> You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
If this is a development machine, remove the Gemfile freeze
by running `bundle install --no-deployment`.
You have added to the Gemfile:
* RedCloth
* tanker
When you add gems to your Gemfile, you MUST bundle in your dev environment before pushing and deploying.
https://github.com/intridea/omniauth.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError)
So what do I do? bundle install works on development, but when I push and deploy to my production server. I get this error, even after running bundle install on my production server.
You're probably running Passenger. This is the issue with some solutions - http://code.google.com/p/phusion-passenger/issues/detail?id=505
Try running bundle install --deployment
This error can be related to the spring gem. Regenerating spring binstubs worked for me.
bundle exec spring binstub --all
https://github.com/rails/spring/issues/387
for the guys that stuck with "bundle & git repo " problems.
1. $ bundle pack
2. $ bundle install --path vendor/cache
more details, please refer to https://stackoverflow.com/a/5268534/445908
For me it was just a matter of adding this to gemfile:
source 'http://gems.github.com'
When your computer never restarts, Spring might be the problem. Spring was running for 350 hours and caused caching the outdated TEST environment. I had this problem in my cucumber test environment in Rubymine. Strange this was that from (mac) the command prompt there was no problem.
spring status
spring stop
and voila! It all worked again.
Ran into this problem after upgrading to ruby 2.7.0
Looks like maybe there has been changes to deprecate the use of the business company focused:github => to the actual software platform focused :git =>. Maybe better for easier code logic maintainability.
Change the following:
gem 'devise', :github => 'plataformatec/devise'
to the following:
gem 'devise', :git => 'git://github.com/plataformatec/devise'
An alternative is you may still reference :github as your git_source at the top of your Gemfile and just reference to the Gems as normal like so:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
...
gem 'devise'
If you run bundle install and then on attempt to run anything you see "... github.com ... is not yet checked out. Run bundle install first."
- that means you need to use bundle exec before your command, e.g.:
bundle exec rails s
Installing gem locally in project directory fix it for me.
$ bundle install --path vendor/bundle
This solution
$ bundle install --path vendor/bundle
has fixed my issue with running multiple rails app via foreman.
Note: Don't forget to execute rbenv rehash after if you are using rbenv.
And add /vendor/bundle in your .gitignore if not yet added.
My problem was that i had no access to github
try ssh -vT git#github.com and see if you get
git#github.com: Permission denied (publickey).
Then see https://help.github.com/articles/error-permission-denied-publickey/
For anyone here in 2021, the accepted answer is outdated as --deployment flag is deprecated.
Use this instead:
bundle config set --local deployment 'true'
It is a permission error. The following worked
Environment : RVM with Apache
RVM user:group : rvm:rvm
Apache user:group : apache:apache
You need to add apache user to RVM group
usermod -a -G rvm apache
What finally helped me once and forever:
Reinstalling everything as Galen suggested (all the steps from https://github.com/carlhuda/bundler/blob/master/ISSUES.md)
Using bundle instead of rvmsudo bundle
Update your Gemfile as follows;
gem 'activeadmin', github: 'activeadmin/active_admin', branch: '0-6-stable'
and then,
bundle install
Iif still error occurs (because of you have tried 'bundle install --deployment', then try running)
bundle install --no-deployment
Restarting bash session helped for me
Another solution, that helped me when I was getting same issue while installing private gem from my Github repo, in Docker (my gems are in volume /gems):
# Add known host
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
RUN bundle config set path /gems # this fixes issue with private repos DON'T USE ENV BUNDLE_PATH /gems
RUN --mount=type=ssh bundle install
To forward SSH, build using this command:
docker build --ssh default .
Recently I got the error message on Circle CI:
#!/bin/bash -eo pipefail
bundle exec rails db:setup
https://github.com/randym/axlsx.git (at c8ac844#c8ac844) is not yet checked out. Run `bundle install` first.
Exited with code exit status 1
CircleCI received exit code 1
This error happened when gem dependencies can not be resolved.
So I switched back to pre release version in my Gemfile to fix it
-gem 'axlsx', github: 'randym/axlsx', ref: 'c8ac844572b25fda358cc01d2104720c4c42f450'
+gem 'axlsx', '3.0.0.pre'
and run update to update the gem dependencies
bundle update axlsx
Authlogic has a couple unfortunate deprecation warnings that are fixed in a fork.
How do I use this forked version? I tried adding the following to my Gemfile:
gem 'authlogic', :git => 'git://github.com/railsware/authlogic.git'
And it didn't work quite that well. I started getting:
git://github.com/railsware/authlogic.git (at master) is not checked out. Please run bundle install
And
The git source git://github.com/railsware/authlogic.git is not yet checked out. Please run bundle install before trying to start your application
Assistance will be rewarded with virtual cookies.
Have you tried running bundle install after removing Gemfile.lock?
rm Gemfile.lock
bundle install
Your Gemfile configuration should work, I was able to use the same for and my bundle install command executes as does my bundle list command.
My other suggestion would be removing you ~/.bundler and .bundle directories and checking that you have properly configured git.
You need to run bundle install from the terminal after updating your Gemfile.