Ok i keep getting this error
Could not find tzinfo-0.3.24 in any of the sources (Bundler::GemNotFound)
I am using rvm and i just created a gemset and i have this
gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.3)
actionpack (3.0.3)
activemodel (3.0.3)
activerecord (3.0.3)
activeresource (3.0.3)
activesupport (3.0.3)
arel (2.0.7)
bcrypt-ruby (2.1.4)
builder (2.1.2)
bundler (1.0.7)
devise (1.1.5)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.14)
mime-types (1.16)
mysql (2.8.1)
paperclip (2.3.8)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.3)
railties (3.0.3)
rake (0.8.7)
riddle (1.2.2)
thinking-sphinx (2.0.0)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)
warden (1.0.3)
will_paginate (3.0.pre2)
and my Gemfile is
source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'mysql'
gem 'devise'
gem 'thinking-sphinx', '2.0.0', :require => 'thinking_sphinx'
gem "paperclip", "~> 2.3"
gem "will_paginate", "~> 3.0.pre2"
any ideas...it was working fine till today
Try including tzinfo-0.3.24 in your Gemfile and doing bundle exec with the command that gives you the error. Alternatively you could bundle install --development to get the Gems in the vendor folder. Let us know how you get on.
After DLL Hell we have Gem Hell. It looks like we have the same dependency hell in Ruby as in other communities. Welcome :-)
The gem tzinfo with the right version 0.3.24 seems to be missing, or it is not referenced correctly in your Gemfile. Check your Gemfile and your Gemfile.lock. The latter is useful to find out dependencies, and it should be updated if the Gemfile is changed (by running a bundle install).
If you have installed the gems locally, by using gem install --user-install gemname or bundle install --path ~/.gem, then you maybe have multiple gems in multiple locations. Check out the GEM PATHS by calling a gem env command from the command line.
And by the way, you seem to use Rails 3.0.x with the old mysql gem. The mysql2 gem is now the default in Rails 3. I would recommend to use the mysql2 gem instead by adding gem 'mysql2' to the GemFile and by using using the mysql2 adapter in your database.yml.
Related
I have different gemsets
> rvm gemset list
gemsets for ruby-2.0.0-p247 (found in /Users/kai/.rvm/gems/ruby-2.0.0-p247)
=> (default)
global
rails4
> rvm gemset use rails4
Using ruby-2.0.0-p247 with gemset rails4
> rails -v
/Users/kai/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (>= 0) among 43 total gem(s) (Gem::LoadError)
from /Users/kai/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /Users/kai/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/bin/rails:22:in `<main>'
from /Users/kai/.rvm/gems/ruby-2.0.0-p247#rails4/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/kai/.rvm/gems/ruby-2.0.0-p247#rails4/bin/ruby_noexec_wrapper:14:in `<main>'
and when I'm doing:
> bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.1.0)
Installing i18n (0.6.4)
Installing multi_json (1.7.9)
Installing activesupport (3.2.7)
Installing builder (3.0.4)
Installing activemodel (3.2.7)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.5)
Installing rack-cache (1.2)
Installing rack-test (0.6.2)
Installing hike (1.2.3)
Installing tilt (1.4.1)
Installing sprockets (2.1.3)
Installing actionpack (3.2.7)
Installing mime-types (1.23)
Installing polyglot (0.3.3)
Installing treetop (1.4.14)
Installing mail (2.4.4)
Installing actionmailer (3.2.7)
Installing arel (3.0.2)
Installing tzinfo (0.3.37)
Installing activerecord (3.2.7)
Installing activeresource (3.2.7)
Installing coffee-script-source (1.6.3)
Installing execjs (1.4.0)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.3)
Installing json (1.8.0)
Installing rdoc (3.12.2)
Installing thor (0.18.1)
Installing railties (3.2.7)
Installing coffee-rails (3.2.2)
Installing jquery-rails (3.0.4)
Using bundler (1.3.5)
Installing rails (3.2.7)
Installing sass (3.2.10)
Installing sass-rails (3.2.6)
Installing sqlite3 (1.3.7)
Installing uglifier (2.1.2)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
But I have ruby 2.0! Why it doesn't install rails 4.0 and activesupport 4.0?
bundler installs gems basing on two files:
Gemfile.lock strict versions saved during previous installation,
Gemfile loose version declaration from user.
when you generate rails project first Gemfile is generated with something like this:
gem 'rails', '~> 3.2'
after the file is generated bundle install is ran which generates Gemfile.lock in which strict versions of gems are recorded, from now on any succeeding call to bundle install will install only the versions saved in Gemfile.lock.
To update gems to newer versions:
check Gemfile for any version restrictions - that might prevent installing the versions you would like to get
run bundle update <gem_name> to update only this single gem and what is require for it - but minimalizing scope of the changes to the smallest possible set of changes.
run bundle update to update all gems to latest versions allowed in Gemfile
bundle install or in short bundle does not install the latest gem unless you have left out the version in your Gemfile. e.g.
gem 'rails'
But usually this is not the case, we specify versions to prevent application from "crashing" when some gems are updated and we unknowingly run bundle update, or for that matter move application to say test or production servers. Usually when adding a gem to Gemfile, we do:
gem 'rails', '~> 3.2.7'
Note the leading ~> in the version number. This says: use rails gem between versions 3.2.7 and less than 3.3.0.
In order for your bundle command to grab rails 4.0, you need to change that line to read either one of the following:
gem 'rails', '>= 3.2.7'
or
gem 'rails', '4.0.0'
If you use gem 'rails', '>= 3.2.7' then your rails application will use the latest gem available in your system. Note that 3.2.7 is just an example I'm using here. If you use gem 'rails', '4.0.0' then your rails application will use rails version 4.0.0.
Please note that this change might break your existing rails 3.2 application.
FullCalendar stopped working after I upgraded some gems. I needed to add 'google-api-client' to the Gemfile and the Bundle Install process gave me the following message:
itsjustme#rubberroom:~/Projects/FunnyFarm$ bundle
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Bundler could not find compatible versions for gem "faraday":
In snapshot (Gemfile.lock):
faraday (0.8.0)
In Gemfile:
google-api-client (>= 0.5.0) ruby depends on
faraday (~> 0.8.1) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Following instructions, I issued a Bundle Update. This was the result:
itsjustme#rubberroom:~/Projects/FunnyFarm$ bundle update
Fetching gem metadata from https://rubygems.org/.....
Error Bundler::HTTPError during request to dependency API
Fetching full source index from https://rubygems.org/
Using rake (10.0.2)
Using i18n (0.6.1)
Using multi_json (1.3.7)
Using activesupport (3.2.3)
Using builder (3.0.4)
Using activemodel (3.2.3)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.3)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.3)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.3)
Using activeresource (3.2.3)
Installing addressable (2.3.2)
Installing extlib (0.9.15)
Installing autoparse (0.3.2)
Using bcrypt-ruby (3.0.1)
Using bundler (1.2.2)
Using coffee-script-source (1.4.0)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.5)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.2.3)
Using coffee-rails (3.2.2)
Using multipart-post (1.1.5)
Using faraday (0.8.4)
Using jwt (0.1.5)
Installing launchy (2.1.2)
Installing signet (0.4.3)
Installing uuidtools (2.1.3)
Installing google-api-client (0.5.0)
Using haml (3.1.7)
Using httpauth (0.2.0)
Using jquery-rails (2.1.3)
Using libv8 (3.3.10.4)
Using mobilepronto (0.3.2)
Using mysql2 (0.3.11)
Using oauth (0.4.7)
Using oauth2 (0.6.1)
Using rails (3.2.3)
Using sass (3.2.3)
Using sass-rails (3.2.5)
Using sorcery (0.7.13)
Using sqlite3 (1.3.6)
Using therubyracer (0.10.2)
Using uglifier (1.3.0)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem
is installed.
Neither CSS nor jQuery files were modified and, being new to RoR, I have no idea where to start looking for a solution.
Screenshots
This is a screenshot taken before the update:
http://pic.twitter.com/85gUGSg3
This one, after the update:
http://pic.twitter.com/rYvIhsbe
Files
The view is too simple to make a difference. But here it is, anyway (show.html.haml):
%h4 Agenda dos Médicos
#calendar
Similarly, the controller is almost empty. It just points to the view.
class WorkSchedsController < ApplicationController
before_filter :require_login
def show
end
end
The magic of it all happens thanks to fullcalendar.js, configured as follows:
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
eventSources: [
// Dr. John Doe
{
url: 'https://www.google.com/calendar/feeds/userthis%40gmail.com/private-blah/basic',
color: 'dodgerblue'
},
// Dr. Jane Doe
{
url: 'https://www.google.com/calendar/feeds/userthat%40gmail.com/private-blah/basic',
color: 'brown'
},
// Code abbreviated
{
...
}
]
});
});
For the sake of completeness, this is the Gemfile, before the adding 'fullcalendar-rails' (as suggested by Mr. Durrant):
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'sorcery'
gem 'mobilepronto'
gem 'execjs'
gem 'therubyracer'
gem 'mysql2'
gem 'haml'
gem 'sass'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
Seems the table which sets the calendar has been flattened.
Can anyone help? Give some pointers or something?
What I see on your screenshots , it reminds me of the nightmare I had in the hot summer days . I have added a class in the .css.scss file , but forgot to close it (one little '}'). No matter I've tried it was a pain and sorrow in various tempos .
In your case I would focus in searching for inconsistent stylesheet , related with the tag "tbody" . It seems all the other css and js are OK . Keep us updated , sir .
Just started up in Rails. I'm on windows vista, installed the latest build of ruby from http://rubyinstaller.org/ and everything went well.
ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
I run:
gem update --system
gem sources -a http://gemcutter.org
gem install rails
No errors reported.
rails --v
Rails 3.1.0
after this I created a folder for my Rails project and I created a new Rails app inside as follows:
rails new test
cd test
bundle install
(again no error reported)
But when I run rails server I get this error:
rails server
←[31mCould not find rails-3.1.0 in any of the sources←[
←[33mRun `bundle install` to install missing gems.←[0m
I try to run bundle again but no success again... After this, if I type again rails -v I get the same error as before. I have to close the windows console and reopen for rails -v to start working again!!
Has anyone experience this?! Can you help?
Thanks!!!
As requested the gemfile content is:
source 'http://rubygems.org'
gem 'rails', '3.1.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
# Pretty printed test output
gem 'turn', :require => false
end
bundle install result:
Fetching source index for http://rubygems.org/
Using rake (0.9.2)
Using multi_json (1.0.3)
Using activesupport (3.1.0)
Using bcrypt-ruby (3.0.0)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0)
Using erubis (2.7.0)
Using rack (1.3.2)
Using rack-cache (1.0.3)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.0)
Using actionpack (3.1.0)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.0)
Using arel (2.2.1)
Using tzinfo (0.3.29)
Using activerecord (3.1.0)
Using activeresource (3.1.0)
Using ansi (1.3.0)
Using bundler (1.0.18)
Using coffee-script-source (1.1.2)
Using execjs (1.2.4)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using rdoc (3.9.4)
Using thor (0.14.6)
Using railties (3.1.0)
Using coffee-rails (3.1.0)
Using jquery-rails (1.0.13)
Installing rails (3.1.0)
Using sass (3.1.7)
Using sass-rails (3.1.0)
Using sqlite3 (1.3.4)
Using turn (0.8.2)
Using uglifier (1.0.2)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem
is installed.
try bundle exec rails server instead of rails server
Here's my error message when I do a DB rake:
Could not find gem 'sqlite3 (>= 0)' in
any of the gem sources listed in your
Gemfile.
I've tried Installing xCode 4.0.2
Commands:
sudo gem install sqlite3-ruby
sudo gem update --system
sudo gem update rails
sudo gem update sqlite3-ruby
Gem list produces:
abstract (1.0.0)
actionmailer (3.0.8, 2.2.2)
actionpack (3.0.8, 2.2.2)
activemodel (3.0.8)
activerecord (3.0.8, 2.2.2)
activeresource (3.0.8, 2.2.2)
activesupport (3.0.8, 3.0.6, 2.2.2)
arel (2.0.10)
builder (2.1.2)
bundler (1.0.14)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.8, 2.2.2)
railties (3.0.8)
rake (0.9.2, 0.8.3)
rubygems-update (1.8.5, 1.8.4, 1.3.1)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.27)
Any suggestions? I'm on Max OS X 10.6
I think it will work if you add sqlite to your Gemfile:
gem 'sqlite3'
And run:
$ bundle update
I solved this by doing:
sudo gem i sqlite3
If you check the man via:
gem help commands
The "i" stands for install, sort of a short cut. Doing this after running the bundle update & all the core updates cased Ruby's rake to work.
Thanks for your help!
I am just getting started learning rails.
I am building my first app using Ruby on Rails tutorial by Michael Hartl.
the book said to use this gem file.
source 'http://rubygems.org'
gem 'rails', '3.0.0.rc'
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
group :development do
gem 'rspec-rails', '2.0.0.beta.18'
end
group :test do
gem 'rspec', '2.0.0.beta.18'
end
However I get the following error when I run bundle install in the terminal:
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.0.rc)
Using builder (2.1.2)
Using i18n (0.4.1)
Using activemodel (3.0.0.rc)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.4)
Using tzinfo (0.3.23)
Using actionpack (3.0.0.rc)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.8)
Using mail (2.2.6.1)
Using actionmailer (3.0.0.rc)
Using arel (0.4.0)
Using activerecord (3.0.0.rc)
Using activeresource (3.0.0.rc)
Using bundler (1.0.0)
Using diff-lcs (1.1.2)
Installing nokogiri (1.4.3.1) with native extensions /Library/Ruby/Site/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Paths suggest you are using a Mac, right? Maybe this answer solves your problem?
gem install mysql failure in Snow Leopard
Error looks the same. Accepted answer said that "Installing the Xcode that's bundled with the Snow Leopard fixed the problem."
Are you on Linux? Here is a list of common problems you might run into when installing stuff in Ubuntu Linux - http://rbjl.net/20-rubybuntu-2-troubleshooting-common-ruby-ubuntu-problems
I am on Linux and had to do the following to get nokogiri to install:
sudo apt-get install libxml2 libxml2-dev libxslt1-dev
gem install nokogiri (remember to use sudo if you are not using RVM)
Just FYI, Rails 3.0 was released on August 29. So you can use
gem 'rails', '3.0.0'