This is the error after I run bundle install in rails. I'm using rails 4.
I already followed the instruction that given but nothings happen.
Gem::RemoteFetcher::UnknownHostError: no such name (https://rubygems.org/gems/has_scope-0.6.0.rc.gem)
An error occurred while installing has_scope (0.6.0.rc), and
Bundler cannot continue.
Make sure that `gem install has_scope -v '0.6.0.rc'` succeeds
before bundling.
then, this is the gemfile
gem 'activeadmin', github: 'gregbell/active_admin'
gem "meta_search"
gem 'bourbon', '3.2.1'
gem 'has_scope', '0.6.0.rc'
Thank you!
This seems to be a network problem. Try doing traceroute rubygems.org from your terminal and see if you are able to reach rubygems.org. If not try again sometime later or try a different host like http://ruby.taobao.org/. You can change the source in the Gemfile. It is usually the first line of the Gemfile, change from rubygems to the above link I gave you if traceroute does not work out.
Related
I am new to ruby on rails and am trying to run my first application which connected to MongoDb. How do i know if I have Mongoid gem installed or if I have to install it? and what is the command to know the gem version.
In my rails application Gemfile I have added:
gem 'mongoid', '~> 5.0.0'
but it gives the error:
usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/resolver.rb:366:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'mongoid (~> 5.0.0.1)' in any of the gem sources listed in your Gemfile or available on this machine. (Bundler::GemNotFound)
I think the gem is not present in your local machine. So it's giving you error. Try running command
bundle install
or you can manually install this gem using console by this command
gem install mongoid -v 5.0.0
Hope it helps. Cheers!
I am trying to rails server from a cloned repo, I have updated ruby, and rails, followed the rvm process, updated all my gem files, and when I go to serve I receive the message
Could not find globalid-0.3.7 in any of the sources Run bundle
install to install missing gems.
So I do bundle install, then get the error
An error occurred while installing pg (0.20.0), and Bundler cannot
continue. Make sure that gem install pg -v '0.20.0' succeeds before
bundling.
Try to insall that and then get
ERROR: Could not find a valid gem 'globalid-0.3.7' (>= 0) in any
repository ERROR: Possible alternatives: globalid, globalize3
I have googled everything and asked many.
globalid is a dependency of the Rails core gem ActiveJob so it is a required gem to have in your Gemfile.lock. See if it is listed in your Gemfile.lock file. If not you could add it to the top of your gemfile including the version
# gemfile
gem 'globalid', '0.3.7'
Then bundle install. If it works, then you can delete it from your gemfile since it should load automatically when Rails loads (since it is a dependency of Rails' ActiveJob). I've run into a similar issue with another gem and this process worked for me.
It could be a version error. Try using gem 'globalid', '~> 0.4.0' in your gemfile and bundling.
Hi I'm doing Rails app and when I bundle install it returns an error:
Could not find coffee-script-source-1.1.3 in any of the sources
I know that coffee-script-source-1.1.3 gem is deprecated/yanked but my other gems are having dependencies with this.
But this project is working with other machine and in heroku production.
How can I successfully bundle install this without changing my gemfile?
Thanks
Run this:
bundle update --source coffee-script-source
If you get an error, like this:
An error occurred while installing rmagick (2.13.1), and Bundler cannot continue.
Run this:
gem install rmagick
I hope it'll help you.
What it worked for me was to update the gem to 1.2.0.
As it shows here https://rubygems.org/gems/coffee-script-source/versions
1.1.3 says that it's yanked.
gem 'coffee-script-source', '~> 1.2.0'
And run
bundle update --source coffee-script-source
When I add has_secure_password to the model (inherited from ActiveRecord::Base), error stating that "bcrypt-ruby is not part of the bundle" occurs.
Here the log is:
Started GET "/users" for 127.0.0.1 at 2012-02-19 16:37:12 +0900
Gem::LoadError (bcrypt-ruby is not part of the bundle. Add it to Gemfile.):
app/models/user.rb:3:in `<class:User>'
app/models/user.rb:1:in `<top (required)>'
app/controllers/users_controller.rb:1:in `<top (required)>'
I installed bcrypt-ruby by
$ gem install bcrypt-ruby
Building native extensions. This could take a while...
1 gem installed
Installing YARD (yri) index for bcrypt-ruby-3.0.1...
Installing RDoc documentation for bcrypt-ruby-3.0.1...
but was no avail.
I tried
$ bundle exec rails server
but was no help.
If I comment out the line "has_secure_password", this error does not come out.
How can I solve this problem?
I already had gem 'bcrypt-ruby', '~> 3.0.0' in Gemfile, and had already ran the command bundle, and yet I still got that message. The problem was that I forgot to restart the server:
touch tmp/restart.txt
As the message says you need to add bcrypt-ruby to your Gemfile (at the root of the project).
Adding
gem "bcrypt-ruby"
and then running bundle install should do the trick (this would fetch the gem if you hadn't already installed it).
You can specify specific versions to, eg
gem "bcrypt-ruby", "~> 3.0.1"
will get you the latest version that is >= to 3.0.1 but less than 3.1. You might do this if 3.0.1 has a bug fix you depend on and you're happy to get more bug fixes but you don't want major changes. There's loads more info on the bundler website.
In your Gemfile add a line
gem 'bcrypt-ruby'
and then from the command line
bundle install
Something that came up for me that is not addressed here yet. I got this error after going to a new system on which I installed Ruby 2.0.x.
It turns out that even if I was using the new bcrypt 3.1.7 it didn't work for me until I ALSO had bcrypt-ruby 3.0.1 in the gemfile. I resisted that when I should have just taken the error at it's word.
gems:
bcrypt (3.1.7 ruby x86-mingw32)
bcrypt-ruby (3.0.1 x86-mingw32, 3.0.0)
gemfile:
gem 'bcrypt-ruby', '~> 3.0.1'
gem 'bcrypt', '~> 3.1.7'
Before adding both I tried all sorts of single version combinations.
Restart the server and reinstall bundle in correct order, that is:
bundle install, bundle update, bundle install
and then server restart.
If you already put the gem in the gem file and bundle installed and you are still getting an error then restart your server.
I work with Ruby 1.9.3 on Windows.
**I have a trouble to do "bundle install" due to a "thin" gem, for my app.
My original GEMFILE looks like this:
gem "sinatra"
gem "mogli"
gem "json"
gem "httparty"
gem "thin"
Running "bundle install" causes Installing eventmachine (0.12.10) with native extensions which fails. Error is described here: Cannot install thin on windows
Just to mention that "gem install thin" is successful!
Some people on the net, facing this issue, suggested to install
"eventmachine" version 1.0.0.beta.4.1 which I did:
gem list --local shows eventmachine (1.0.0.beta.4.1 x86-mingw32, 1.0.0.beta.2 x86-mingw32)
Yet "bundle install" fails.
In another post: ROR 3.1: Bundle update fails (eventmachine gem)
I followed the advise to specify the exact version of "eventmachine" in GEMFILE, so I edited it like (hopefully I did it right)
gem "sinatra"
gem "mogli"
gem "json"
gem "httparty"
gem "eventmachine" "1.0.0.beta.4.1"
gem "thin"
Now, "bundle install" fails with a different error:
Could not find gem 'eventmachine1.0.0.beta.4.1 (>= 0) ruby' in any of the gem sources listed in your Gemfile.
As I mentioned, this version was successfully installed, and it appears in the local repository.
Please help to make "bundle" "happy" with the right 'eventmachine' version.
Sorry if I missed something basic, or failed to find answer already published.
I think you are missing a comma in this line of the last Gemfile:
gem "eventmachine", "1.0.0.beta.4.1"