I'm running ruby 1.9.3-p125 and rails 3.2.6. When I run bundle install, I get the error:
Could not find addressable-2.3.1 in any of the sources
My Gemfile.lock contains "addressable (2.3.1)", but it isn't an explicit dependency of my application. Why is this, and how can I fix it?
addressable-2.3.1 was yanked http://rubygems.org/gems/addressable/versions/2.3.1
Use bundle update to update Gemfile and it will use addressabe-2.3.2 instead
Related
I'm trying to run a tootctl command, but am running into a problem with it not being able to detect the required dependency is not present.
Could not find concurrent-ruby-1.1.10 in any of the sources
I have run bundle install and the gems get installed (or are confirmed already installed), but the command still has trouble not finding the
Using concurrent-ruby-1.1.10
...dozens of other packages
Using rails-settings-cached 0.6.6
Bundle complete! 122 Gemfile dependencies, 225 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Bundled gems are installed into `../vendor/bundle`
then I attempt the command again..
me#mastodon-vm:/var/www/mastodon/bin$ ./tootctl media remove --days=7
Could not find concurrent-ruby-1.1.10 in any of the sources
Run `bundle install` to install missing gems.
me#mastodon-vm:/var/www/mastodon/bin$
but I'm back to the same problem. What is the typical approach to fix this?
Note: I did try to follow the guidance in this SO post, but it broke the entire installation. I was able to save it by replacing Gemfile and Gemfile.lock from Mastodon's source (phew)
Your log shows
Gems in the groups 'development' and 'test' were not installed.
Try to install your Gems with
bundle install --with development test
or run
RAILS_ENV=production tootctl
According to https://rubygems.org/gems/concurrent-ruby/versions/1.1.10 the gem is named "concurrent-ruby". When I run gem install concurrent-ruby, it is installed successfully on my computer.
I get this error Could not find command "add" when I try to run something like bundle add bcrypt_pbkdf --version "<2.0,>=1.0"
I cannot find anything like this online. I tried bundle install, bundle update, gem install bundler, etc, but it didn't work
How do I fix it?
bundle doesn't have a subcommando for adding new gems. To add a new one, open the Gemfile and manually add your new gem into it. Like:
gem bcrypt_pbkdfm, "~> 1.1"
After that, run:
bundle install
It will read your Gemfile, will download the gems and create a new Gemfile.lock with the installed version.
To understand more about the specs of Gemfile visit https://bundler.io/gemfile.html
EDIT
In fact bundle has bundle add command. I've never used, but it seems to achive the same goal as the manual insert.
I have done
gem install bundle
inside my directory that I have a git repository. But now when I try to run it with
bundle
run bundle
bundle install
it says:
Could not locate Gemfile.
How would I check that it has installed ?
It looks like it installed the gem correctly, however, you need to create a file named Gemfile for bundler to know what gems it should install. This file should be in your project's root. You can create one manually, or run bundle init to have a default one generated.
You can read more about the Gemfile in the docs
I'm trying to start a rails application in IntelliJ with the Ruby plugin.
I've imported the application and set up the run configuration as best I can. When I try to run it I get the error:
NoMethodError: undefined method `version_requirements' for #<Gem::Dependency:0x7de21f45>
When looking for an answer I found this page saying that I should do this:
$ gem install rubygems-update -v='1.4.2'
$ gem uninstall rubygems-update -v='1.5.0'
$ update_rubygems
Since it's IntelliJ's ruby plugin that is managing the gems, I assume that I have to change the version of rubygems-update that the plugin is using.
Is this the right approach to take? And if so, can anyone tell me how to go about it?
I tried listing the gems but that gem is not shows so I must not be listing the gems in the right place, but I don't know where to look.
Many thanks :)
IntelliJ IDEA cannot handle it, you will need to install the appropriate rubygems version from the command line.
Note that your current rubygems-update version may be different, verify it with gem list and use the reported version when uninstalling.
I installed Bundler on a pre-Rails 3 application and am trying to use it to install gems. My Gemfile contains the following lines:
source :rubygems
[...]
gem "RubyInline", "3.8.1"
However, when I run bundle install I get this error:
Fetching source index for http://rubygems.org/
Could not find gem 'RubyInline', required by 'memcache-client (= 1.6.3)', in any of the sources
The gem appears on the rubygems website:
http://rubygems.org/gems/RubyInline
Why is it giving me an error then?
I'm afraid this resolved itself after changes to fix other issues, and I'm not sure what the fix was. The source of several other issues was wrong permissions on various gems/binaries.
This kind of issue for me seems to be resolved on occasion by applying
bundle update
before
bundle install
The effect is to resolve old dependencies from when the bundle was originally produced and hence a gem that has been superseded (or whatever) will no longer be in the Gemfile.