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.
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'. When I entered teh project through command promt, it asked to install rvm use ree-1.8.7-2012.02 [ x86_64 ].
When i run bundle install, i am getting the following error:
[root#raj community]# bundle install
/usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [] (Gem::LoadError)
from /usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
from /usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:1208:in `gem'
from /usr/local/bin/bundle:22
from /usr/local/bin/ruby_executable_hooks:15
Please help me out.
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 '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'
You need to install bundler. Here are some words from RVM official website:
Starting with 1.11.0 new RVM installations has bundler enabled by default, you can still install it.
Try installing rubygems-bunder with:
gem install rubygems-bundler
Now, to make all the executables bundler compatible, run:
gem regenerate_binstubs
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'm upgrading an app to Rails 3 and have been going through it bit by bit, for example replacing all the old plugins with the relevant gems in the gemfile.
I seem to have got stuck however because now whenever I try to run the server I get this:
=> Booting WEBrick
=> Rails 3.0.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/camillavk/.rvm/gems/ruby-1.9.3-p551#rails3/gems/rack-1.2.8/lib/rack/builder.rb:35: stack level too deep (SystemStackError)
I've been googling it for ages and have come to the conclusion that it is still because of one of the plugins, I just can't figure out which one. I have removed each one individually but none of them makes a difference.
I found these three similar questions but they don't really help me....
Stack level too deep error after running bundle update
SystemStackError at the rack level in Ruby 1.9.2, not 1.8.7
Stack level too deep trying to update from 3.0 to 3.1
My gemfile looks like this at the moment:
source 'https://rubygems.org'
gem "rails", "3.0.0"
#need to replace old acts_as_commentable vendor plugin
gem 'acts_as_commentable', '3.0.1'
gem "airbrake"
#need to add authlogic gem
gem 'authlogic', '~> 2.1.6'
gem "aws-s3"
gem "bj"
gem "bundler", "~> 1.0.0"
gem "calendar_date_select", "1.15"
gem "cancan", "1.2.0"
gem "carmen"
#replace plugin casein?
gem 'casein', '3.1.0'
gem 'comma', '0.4.1'
gem 'exifr'
# factory_girl 1.2.4 wasn't working with Rails 3 - consider an upgrade to factory_girl_rails?
# gem "factory_girl", "1.2.4"
gem 'fastercsv'
gem "geokit"
#need to replace above with below
gem 'geokit-rails'
gem "haml"
gem "hpricot"
gem 'hoptoad_notifier'
gem "jrails"
gem "libxml-ruby", "2.4.0"
gem "memcached", "~> 1.8.0"
#memcached no longer works?
gem 'dalli'
# Not sure why we have this if we're using SQLite3
gem "mysql2", "~> 0.2.6"
#TODO: changed by almazom
gem "rake", "0.8.4"
gem 'recurly'
gem "rdoc"
gem "rmagick"
gem "rspreedly"
gem "rubyzip"
gem 'sass'
# searchlogic not supported for rails3
# gem 'searchlogic'
gem 'rd_searchlogic', :require => 'searchlogic', :git => 'git://github.com/railsdog/searchlogic.git'
#need to use simplecov when upgrading to ruby 2 as rcov doesn't work
gem "simplecov"
gem 'sqlite3'
# tmail no longer included in rails 3?
gem 'tmail'
#need to upgrade will_paginate for casein...?
# gem "will_paginate", "2.3.16"
gem 'will_paginate', '3.0.4'
gem 'yaml_db'
group :development, :test do
gem 'test-unit', '1.2.3'
gem 'rspec', '1.3.2'
gem 'rspec-rails', '~> 1.3.4'
end
group :test do
gem 'capybara', '0.3.5'
gem 'cucumber', '1.1.2'
gem 'cucumber-rails', :git => "git://github.com/RKelln/cucumber-rails.git", :branch => "0.3.2-capybara-fix"
gem 'database_cleaner'
end
And the plugins I have are:
acts-as-favorite-updated
acts_as_configurable
acts_as_follower
better_logging
concerned_with
default_value_for
fast_context
fetcher
has_many_friends
jrails
paperclip
parallel_tests
rails_upgrade
yaml_db
Does anyone have any idea how I can deal with this issue?? :-(
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