I am getting the following error while running bundle install. I am getting this error while installing i18n gem. I am getting this error in Cent OS machine only.I didn't get this error in Windows machine.
[root#centos5_9 IDEA]# bundle install
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException
from DefaultResolver.java:111:in `makeTime'
from DefaultResolver.java:277:in `create'
from DefaultResolver.java:317:in `handleScalar'
from DefaultResolver.java:435:in `orgHandler'
from DefaultResolver.java:455:in `node_import'
from org/yecht/ruby/DefaultResolver$s_method_1_0$RUBYINVOKER$node_import.gen:65535:in `call'
from CachingCallSite.java:146:in `call'
from RubyLoadHandler.java:40:in `handle'
from Parser.java:300:in `addNode'
from DefaultYAMLParser.java:676:in `yyparse'
from Parser.java:290:in `yechtparse'
from Parser.java:284:in `parse'
My gem file contains following code.
source 'http://rubygems.org'
gem 'rails', '3.2.13'
gem "xml-simple", "=1.0.12"
gem "fastercsv", "=1.5.3"
gem "hpricot", "=0.8.2"
gem "newrelic_rpm", "=3.1.1"
gem "mime-types", "=1.16"
gem "writeexcel", "=0.6.4"
gem "i18n"
#gem "warbler","=1.3.0"
gem "rmagick4j","=0.3.7"
gem "starling","=0.10.1"
gem "jruby-memcache-client","=1.7.0"
gem "tzinfo","=0.3.29"
gem "jruby-jars","=1.5.6"
gem "jruby-rack","=1.0.5"
gem "activerecord-jdbc-adapter","=1.2.9"
gem "activeresource","=3.2.13"
gem "activesupport","=3.2.13"
gem "bouncy-castle-java","=1.5.0147"
gem "bundler","=1.3.5"
gem "columnize","=0.3.2"
gem "eventmachine","=0.12.10"
gem "jdbc-mysql"
gem "jruby-openssl","=0.8.8"
gem "jruby-prof","=0.1.0"
gem "memcache-client","=1.8.5"
gem "rack","=1.4.5"
gem "rake","=0.8.7"
gem "rspec","=1.3.0"
# gem "ruby-debug-base","=0.10.3.2"
gem "rubyzip","=0.9.4"
gem "sources","=0.0.1"
gem "mogli","=0.0.25"
gem "facebooker2","=0.0.8"
gem "json","=1.5.1"
gem "multi_json","=1.0.3"
gem "net-ldap", "=0.2.2"
gem "multi_xml","=0.4.1"
gem "httparty","=0.8.1"
gem 'exception_notification', :require => 'exception_notifier'
gem 'safe_attributes'
gem 'will_paginate'
gem 'delayed_job_active_record'
gem "daemons"
gem 'jruby-rack-worker', :platform => :jruby, :require => nil
#gem "ffi", "~> 1.9.0"
#gem 'spoon'
gem "resque"
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyrhino'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
platforms :jruby do
# gem "ruby-debug", "= 0.10.3"
# This is needed by now to let tests work on JRuby
# TODO: When the JRuby guys merge jruby-openssl in
# jruby this will be removed
#gem "jruby-openssl"
group :db do
gem "activerecord-jdbcmysql-adapter", "=1.2.9"
end
end
I am using rails 3.2.13.Please help us on this.
Thanks,
Initially reinstall the bundler at root or set up the ruby and rails environment:-
$ gem install bundler / brew gem install bundler
$ rvm use <ruby/jruby version>#<rails_version> if you are using rvm
Now go in your application directory and then run
$ bundle install
$ bundle update ( to get the latest version gem )
and you can try https://rubygems.org # some time it will work
Related
I recently got a old Rails application and trying to install gems through bundle install. But it keeps reminding me :
Bundler could not find compatible versions for gem "bundler": In Gemfile:rails (~> 3.2) was resolved to 3.2.22.5, which depends on bundler (~> 1.0)
After some google search, I get to know that rails 3.2 freezes bundler version at 1.0. So I uninstalled my current bundler(2.0.1) by doing `gem uninstall bundler -v 2.0.1and install bundler 1.0.10gem install bundler -v 1.0.10```, but another error occurs:
/home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:3:in <top (required)>':
undefined methodsource_index' for Gem:Module (NoMethodError)
Did you mean? sources
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler.rb:195:in default_gemfile'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler.rb:165:inroot'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler.rb:171:in app_config_path'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler.rb:183:insettings'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler/cli.rb:222:in install'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:inrun'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in invoke_task'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:indispatch'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in start'
from /home/alec/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/bundler-1.0.10/bin/bundle:13:in'
from /home/alec/.rbenv/versions/2.3.7/bin/bundle:22:in load'
from /home/alec/.rbenv/versions/2.3.7/bin/bundle:22:in'
BTW, my Gemfile:
source 'http://gems.ruby-china.com'
unless RUBY_PLATFORM =~ /w32/
# unix-like only
gem 'iconv'
if RUBY_PLATFORM =~ /darwin/
gem "rmagick", "= 2.15.4" ## osx must be this version
elsif RUBY_PLATFORM =~ /linux/
gem 'simple_xlsx_reader'
gem "rmagick", "~> 2.13.1" ## centos yum install ImageMagick-devel
gem 'pdfkit'
gem 'wkhtmltopdf-binary'
gem 'rqrcode', '~> 0.10.1'
gem 'rqrcode_png'
end
gem 'certified'
gem 'net-ssh', '2.9.1'
gem 'jenkins_api_client'
gem 'nokogiri'
end
#gem 'simple_xlsx_reader'
gem 'wechat',path: 'lib/wechat'
gem 'grack', path:'lib/grack'
gem 'gitlab', path: 'lib/gitlab-cli'
gem 'rest-client'
gem "mysql2", "= 0.3.18"
gem 'redis-rails'
gem 'rubyzip'
gem 'delayed_job_active_record'#, :group => :production
gem 'daemons'
gem 'grape', '~> 0.9.0'
gem 'grape-entity', '= 0.4.5'
gem 'rack-cors', :require => 'rack/cors'
gem 'seems_rateable', '~> 1.0.13'
gem 'rails', '~> 3.2'
gem "jquery-rails", "~> 2.0.2"
gem "i18n", "~> 0.6.0"
gem 'coderay', '~> 1.1.0'
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder", "3.0.0"
gem 'acts-as-taggable-on', '2.4.1'
gem 'spreadsheet'
gem 'ruby-ole'
gem 'rails_kindeditor',path:'lib/rails_kindeditor'
gem 'binding_of_caller'
gem 'chinese_pinyin'
# gem 'sunspot_rails', '~> 1.3.3'
# gem 'sunspot_solr'
# gem 'sunspot'
# gem 'progress_bar'
gem 'ansi'
gem 'kaminari'
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
#rails 3.2.22.2 bug
# gem "test-unit", "~>3.0"
### profile
# gem 'oneapm_rpm'
# gem 'therubyracer'
group :development do
gem 'grape-swagger'
gem 'better_errors', '~> 1.1.0'
# gem "query_reviewer"
gem 'rack-mini-profiler', '~> 0.9.3'
if RUBY_PLATFORM =~ /w32/
gem 'win32console'
end
if RUBY_PLATFORM =~ /darwin/
gem 'puma'
end
end
group :development, :test do
if RUBY_VERSION >= '2.0.0'
gem 'pry-byebug'
gem "test-unit", "~>3.0"
end
gem 'rspec-rails', '~> 3.0'
gem 'factory_girl_rails'
end
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
# Optional gem for LDAP authentication
group :ldap do
gem "net-ldap", "~> 0.3.1"
end
# Optional gem for OpenID authentication
group :openid do
gem "ruby-openid", "~> 2.1.4", :require => "openid"
gem "rack-openid"
end
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
else
warn("Please configure your config/database.yml first")
end
# Load plugins' Gemfiles
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(file)
end
I have searched everywhere but nothing useful. Any help would highly appreciated!Thx.
It seems like there's some incompatibility between an old version of bundler and rubygems.
I was able to successfully install your Gemfile by updating bundler (In this snippet I'm updating it to latest available v1):
$ gem uninstall bundler
$ gem install bundler -v '~>1'
$ bundle install
i am having ruby version ruby-1.9.3-p547 [ x86_64 ] which i am using for Rails 3.0.
Now i am having a project with rails version '2.3.18'. and ree-1.8.7-2012.02 [ x86_64 ].
bundle install and rake db:create is working fine and when I run rake db:migrate i am getting the following notice:
Missing these required gems:
crypt19 = 1.2.1
You're running:
ruby 1.8.7.374 at /usr/local/rvm/rubies/ree-1.8.7-2012.02/bin/ruby
rubygems 1.8.15 at /usr/local/rvm/gems/ree-1.8.7-2012.02#community_clean, /usr/local/rvm/gems/ree-1.8.7-2012.02#global
Run `rake gems:install` to install the missing gems.
And when I run the above command, i am getting error as:
ERROR: Could not find a valid gem 'crypt19' (= 1.2.1) in any repository
ERROR: Possible alternatives: crypt, crypt3, crypto, cryptor, cryptsy
and you can see in below Gemfile that i am comment crypt19.
My Gemfile:
source 'http://rubygems.org'
gem 'rails', '2.3.18'
gem 'sqlite3'
gem 'acts-as-taggable-on', '2.0.4'
gem 'acts_as_archive', '0.4.0'
gem 'acts_as_dropdown', '2.0.3'
gem 'also_migrate', '0.3.5'
gem 'axlsx', '1.3.5'
#gem 'crypt19', '1.2.1'
gem 'bitly', '0.5.1'
gem 'builder', '3.0.0'
gem 'capistrano', '2.5.18'
gem 'capistrano-ext', '1.2.1'
gem 'chronic', '0.3.0'
gem 'command-t', '1.2.1'
gem 'daemons', '1.0.10'
gem 'database_cleaner', '0.6.0'
gem 'diff-lcs', '1.1.2'
gem 'eventmachine', '0.12.10'
gem 'github-markup', '0.5.3'
gem 'hashie', '0.2.0'
gem 'hoe', '2.5.0'
gem 'hoptoad_notifier', '2.4.2'
gem 'htmlentities', '4.3.1'
gem 'httparty', '0.5.2'
gem 'i18n', '0.6.0'
gem 'json_pure', '1.4.6'
gem 'mail', '2.3.0'
gem 'memcache-client', '1.8.5'
# gem 'memcached', '0.19.7'
gem 'mime-types', '1.16'
gem 'mocha', '0.9.10'
gem 'mogli', '0.0.16'
gem 'money', '2.1.5'
gem 'mover', '0.3.6'
gem 'oauth', '0.4.7'
gem 'polyglot', '0.3.1'
gem 'pony', '1.3'
gem 'powder', '0.1.7'
gem 'prawn', '0.8.4'
gem 'prawn-core', '0.8.4'
gem 'prawn-layout', '0.8.4'
gem 'prawn-security', '0.8.4'
gem 'rack', '1.1.6'
gem 'rack-rewrite', '1.0.2'
gem 'rack-test', '0.5.6'
# gem 'rmagick', '2.13.1'
gem 'rspec', '1.3.1'
gem 'rspec-rails', '1.3.3'
gem 'ruby-hmac', '0.4.0'
gem 'rubyzip', '0.9.9'
gem 'rvm', '1.11.3.5'
gem 'thor', '0.14.6'
gem 'tzinfo', '0.3.16'
gem 'validatable', '1.6.7'
gem 'webrat', '0.7.2'
gem 'will_paginate', '2.2.2'
gem 'xml-simple', '1.0.12'
gem 'yajl-ruby', '0.7.8'
gem 'rake', '0.8.7'
Please pull me out of this issue.
As of February of 2013, the crypt19 gem vanished from rubygems. Although, the gem is still hosted on github, so you can specify manually the git repository from where to fetch the gem:
gem 'crypt19-rb', :git => 'https://github.com/coffeejunk/crypt19.git', :branch => 'master'
Also, make sure you specify the correct gem version to be used, since the above gem's version is 1.3.1, instead of 1.2.1 . In your environment.rb file, add the following line (or replace it with the good version):
config.gem 'crypt19-rb', :version => '1.3.1'
As to why the bundler tries to install your gem even though it's commented, I'm not sure I can explain. Perhaps it's because you're missing a space? But that's odd.
I keep getting this error when trying to run ZenTest
Invalid gemspec in [/usr/local/rvm/gems/ruby-1.9.3-p194/specifications/ZenTest-4.9.3.gemspec]: Illformed requirement ["< 2.1, >= 1.8"].
I have tried removing the ZenTest 4.9.3 and gem instal ZenTest 4.8.3 but that version cannot be found in any repositories so it automatically installs ZenTest 4.9.3 which keeps having an error and hence I cant run spork or autotest. Is there any way around this? Thanks!
Here is my gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
gem 'spork'
gem 'rspec-core'
gem 'autotest', '4.4.6'
gem 'autotest-rails', '4.1.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development, :test do
gem 'sqlite3'
gem 'rspec-rails'
gem 'webrat'
gem 'capybara'
gem 'Zentest', '4.8.3'
end
group :production do
gem 'pg'
end
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
I had the same problem. After digging, I found the solution. The problem is most likely to be with the version of RubyGems installed in your system. (It would be <1.8.25)
Till that version, RubyGems didn't roundtrip gemspecs properly and thus couldn't parse "< 2.1, >= 1.8" correctly.
So, go through these steps:
gem uninstall ZenTest
gem update --system
gem install ZenTest
The problem should get solved and you should no longer receive the warnings.
I need to work with a rails application on Mac OS 10.8 but I am having troubles starting the rails server.
I installed Ruby and I am using version ruby-1.9.2-p320 and I installed rvm and rails.
Following the Ruby Getting Started Guide (http://guides.rubyonrails.org/getting_started.html) what I need now is simply navigate into my application folder and run the command:
rails server
but I get this error
git://github.com/archiloque/rest-client.git (at master) is not checked out. Please run `bundle install`
When running the command bundle install I get stuck with the following error
Could not find gem 'rest-client (>= 0) ruby' in git://github.com/archiloque/rest-client.git (at master).
Source does not contain any versions of 'rest-client (>= 0) ruby'
What am I missing?
Strange thing I just noticed is that when running
gem rails install
I am notified that rails has been correctly installed (Successfully installed rails-3.2.13), but when checking its version
rails --version
I receive again the error message
git://github.com/archiloque/rest-client.git (at master) is not checked out. Please run `bundle install`
The content of my Gemfile follows:
source 'https://rubygems.org'
gem 'rails', '3.2.5'
gem 'sqlite3'
gem 'devise', '2.1.2'
gem 'rest-client', :git => 'git://github.com/archiloque/rest-client.git'
gem 'jquery-rails'
gem 'rspec-rails', group: [:test,:development]
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git"
gem "rb-readline"
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'twitter-bootstrap-rails'
gem 'uglifier', '>= 1.0.3'
end
group :test do
gem 'debugger'
gem 'factory_girl_rails'
gem 'capybara'
gem 'guard-rspec'
gem 'vcr'
gem 'fakeweb'
gem 'rb-fsevent', :require => false
gem 'guard-rspec'
gem 'growl'
gem 'database_cleaner'
end
group :development do
gem 'capistrano'
gem 'capistrano-ext'
gem 'rvm-capistrano'
end
The owner of rest-client moved the repository, see here (https://github.com/archiloque/rest-client).
Use this in your Gemfile gem 'rest-client', :git => 'git://github.com/rest-client/rest-client.git'
I've problem with SocialNews framework from NewsTrust.
I use Ruby 187, Rails 2.3.11, DevKit, Visual C++ 2008 EE on Windows XP, when I run ruby script/server then I got following error: http://pastebin.com/LpNDRqcg.
The gemfile:
source :gemcutter
gem "rails", "2.3.11"
gem "sqlite3-ruby", :require => "sqlite3"
gem "mysql"
gem "aws-s3" ,'0.6.2' #<--- if you use aws for image storage
gem "right_aws", '2.1.0' #<--- if you use aws for image storage
gem "bj", '1.0.1'
gem "crack", '0.1.6'
gem "feed-normalizer", '1.5.2'
gem "hashie", '0.1.8'
gem "highline", '1.4.0'
gem "hoe", '2.3.3'
gem "hpricot", '0.8.4'
gem "httparty", '0.4.3'
gem "image_science"
gem "json", '1.2.0'
gem "libxml-ruby", '2.0.6'
gem "newrelic_rpm", '2.14.1'
gem "nokogiri", '1.4.4'
gem "rake", '0.9.0'
gem "RedCloth", '4.2.2'
gem "rspec", '1.2.9'
gem "ruby-debug", '0.10.4'
gem "RubyInline", '3.9.0'
gem "twitter", '0.8.4'
gem "twitter_oauth", '0.3.2'
gem "unicode", '0.4.0'
gem "will_paginate", '2.3.15'
gem "xml-simple", '1.0.15'
gem "ZenTest", '4.3.0'
gem "rdoc"
gem "koala"
gem "riddle"
gem "ruby-openid",'2.0.4'
# bundler requires these gems in all environments
# gem "nokogiri", "1.4.2"
# gem "geokit"
group :development do
# bundler requires these gems in development
# gem "rails-footnotes"
end
group :test do
# bundler requires these gems while running tests
# gem "rspec"
# gem "faker"
end
Can anybody help me please? What I need to do? Thanks anyway..
By the way, how to convert ImageScience into Rmagick from this script (SocialNews framework)?
Create the folder C:\Documents and Settings\pije76\.ruby_inline. And your stack is ancient.