Rails - rMagic is not working? - ruby-on-rails-3

I am trying ti use "carrierWave". I have installed "imagemagic" using homebrew and both rmagic and carrierwave gems.
When I run rails g uploader image I get this error in terminal -
Will appreciate any help
Shani
shannoga$ rails g uploader image
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0/gems/rmagick-2.13.1/lib/rmagick.rb:11:in
require':
dlopen(/Users/shannoga/.rvm/gems/ruby-1.9.3-p0/gems/rmagick-2.13.1/lib/RMagick2.bundle,
9): Library not loaded: /usr/X11/lib/libfreetype.6.dylib (LoadError)
Referenced from: /usr/local/lib/libMagickCore.5.dylib Reason:
Incompatible library version: libMagickCore.5.dylib requires version
14.0.0 or later, but libfreetype.6.dylib provides version 13.0.0 - /Users/shannoga/.rvm/gems/ruby-1.9.3-p0/gems/rmagick-2.13.1/lib/RMagick2.bundle
from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0/gems/rmagick-2.13.1/lib/rmagick.rb:11:in
' from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in
require' from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in
block (2 levels) in require' from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in
each' from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in
block in require' from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in
each' from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in
require' from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.22/lib/bundler.rb:122:in
require' from
/Users/shannoga/SITES/ANGELS_APP_CMS/config/application.rb:7:in' from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:24:in
require' from
/Users/shannoga/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:24:in
' from script/rails:6:in require' from
script/rails:6:in'

If any one gets into this problem -
I was using mountain lion and had to manually install the latest xQuartz for mountain lion and every thing works fine now.

Installing the latest xQuarts and running a system update worked for me. Related to this other post: Imagemagick issue on Lion installed with Homebrew

Related

LoadError: incompatible library version with nokogiri 1.6.8.1

I am working on quite old project which is running on old version of Ruby and Rails.
Ruby Version = 1.9.3p551
Rails verison = 3.1.10
So when i am trying to configure this project on new machine the it shows
the error related to NOKOGIRI.
"LoadError: incompatible library version - /home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri/nokogiri.so
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:32:in require'
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:32:inrescue in '
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:28:in <top (required)>'
/var/www/glo/config/application.rb:7:in'
/var/www/glo/Rakefile:4:in <top (required)>'
LoadError: cannot load such file -- nokogiri/2.3/nokogiri
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:30:inrequire'
/home/global/.rvm/gems/ruby-1.9.3-p551/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:30:in <top (required)>'
/var/www/glo/config/application.rb:7:in'
/var/www/glo/Rakefile:4:in `'
(See full trace by running task with --trace)
global#del1-lhp-N01167:/var/www/glo$ ruby -v
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
"
I have tried many things but still this problem is not solved.
So please help me out from this.
Thanks

Jekyll Serve not working.Uninitialized constant. Windows 8

I have installed Jekyll on Windows 8 and created a new application. I am inside the directory and it gives me this error when I run jekyll serve
C:/Blog/> jekyll serve
C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/psych_resolver
.rb:4:in `<class:PsychResolver>': uninitialized constant Psych::Nodes (NameError
)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/p
sych_resolver.rb:2:in `<module:SafeYAML>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/p
sych_resolver.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/l
oad.rb:131:in `<module:SafeYAML>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/safe_yaml-1.0.4/lib/safe_yaml/l
oad.rb:26:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll.rb:26:i
n `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_requir
e.rb:69:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:6:in `<
top (required)>'
from C:/Ruby200/bin/jekyll:23:in `load'
from C:/Ruby200/bin/jekyll:23:in `<main>'
Here is my _config.yml file
# Site settings
title: Your awesome title
email: your-email#domain.com
description: > # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog/
url: "http://yourdomain.com" # the base hostname & protocol for your site
twitter_username: jekyllrb
github_username: jekyll
# Build settings
markdown: kramdown
Thanks if anyone can help!
run gem cleanup it should solve the problem
This happened to me I fixed it by doing this:
First list your gems gem list
...
pg_search (0.7.9)
polyglot (0.3.5)
posix-spawn (0.3.10)
power_assert (0.2.2)
psych (2.0.5, 2.0.0)
pygments.rb (0.6.2)
rack (1.6.0)
rack-cache (1.2)
rack-protection (1.5.3)
...
Where you see psych, try using psych 2.0.5 gem uninstall psych -v 2.0.0
If you get an error message than uninstall gem 2.0.5 instead gem uninstall psych -v 2.0.5
Try Jekyll. This worked for me. You need to find the version of psych that interacts with your Ruby setup correctly. In my case was 2.0.0 but could be different for you.
Try bundle exec jekyll serve in some cases this will solve your issues.

Installing/Running Thin Webserver on Rails 3

Having an issue running the "Thin" web server. It looks like installation was successful but when I run "thin start" It appears as though Thin starts to initialize but then cannot find some resources it needs.
Below, is the audit trail from my terminal session. Can someone offer a hand with this? According to the Thin docs, installation was done correctly. Thanks
Rails 3.2.12
ruby 1.9.3
root#pgateway:/var/www/testapp# gem install thin
Fetching: eventmachine-1.0.0.gem (100%)
Building native extensions. This could take a while...
Fetching: daemons-1.1.9.gem (100%)
Fetching: thin-1.5.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed eventmachine-1.0.0
Successfully installed daemons-1.1.9
Successfully installed thin-1.5.0
3 gems installed
root#pgateway:/var/www/testapp# thin start
>> Using rack adapter
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:3000, CTRL+C to stop
/usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends /tcp_server.rb:16:in `connect': cannot load such file -- thin/connection (LoadError)
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends/base.rb:55:in `block in start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/backends/base.rb:63:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/server.rb:159:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/controllers/controller.rb:86:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
from /usr/local/rvm/gems/ruby-1.9.3-p385/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/thin:19:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/thin:19:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `<main>'
You seem to install thin separate from rails
Add it to your gemfile and you should be fine
If you want to use a gem, it must be in your Gemfile. You can solve your problem as follows:
Add the following line to your Gemfile: gem 'thin'
Update your current app's environment: bundle install
Then start server
Try to execute the following command:
cd to/your/rails/app
echo 'gem "thin"' >> Gemfile
thin start
this content from https://github.com/macournoyer/thin/issues/115

Rails console not working with redgreen gem

I have a problem with rails console, here is what I am getting when I try to start rails console:
backo#speedy:~/ucimrails/simple_app$ rails c --sandbox
/home/backo/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in require': no such file to load -- test/unit/ui/console/testrunner (LoadError)
from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:inblock in require'
from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in load_dependency'
from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:inrequire'
from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/redgreen-1.2.2/lib/redgreen.rb:2:in <top (required)>'
from /home/backo/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:inrequire'
from /home/backo/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in block (2 levels) in require'
from /home/backo/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:ineach'
from /home/backo/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in block in require'
from /home/backo/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:ineach'
from /home/backo/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in require'
from /home/backo/.rvm/gems/ruby-1.9.2-p320#global/gems/bundler-1.1.4/lib/bundler.rb:119:inrequire'
from /home/backo/ucimrails/simple_app/config/application.rb:13:in <top (required)>'
from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.2/lib/rails/commands.rb:39:inrequire'
from /home/backo/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.2/lib/rails/commands.rb:39:in <top (required)>'
from script/rails:6:inrequire'
from script/rails:6:in `'
I located the problem is caused by redgreen gem. When I exclude it from Gemfile, console works again. But, can someone help me to make it working with redgreen gem? Interesting is that this is only happening on my netbok, when I work on my desktop computer all is fine with rails console.
Specifying in my Gemfile:
gem 'test-unit', '1.2.3'
...seems to work for me with 1.9.3 and Rails 3.2.8. It would, however, be nice to use this with a more recent version of test-unit (looks like 2.5.2 is the latest right now)...
The redgreen gem doesn't work with 1.9.2; for redgreen test output you might try
require 'test/unit'
require 'test/unit/ui/console/testrunner'
class Test::Unit::UI::Console::TestRunner
def guess_color_availability; true; end
end
in your test helper or so.

Could not find cache store adapter for memory_store

For some reason anytime I'm running a Rails 3.0.3 application with Ruby 1.8.7. It's been running fine and I haven't set any cache_store settings anywhere. Now anytime I try to run rake tasks or rails command I get this:
$:rails console production
/home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/cache.rb:65:in `lookup_store': Could not find cache store adapter for memory_store (no such file to load -- active_support/cache/memory_store) (RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application/bootstrap.rb:48
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/core_ext/kernel/reporting.rb:22:in `with_warnings'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application/bootstrap.rb:48
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `send'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
from /home/marc_m3pt0/m3pt0.com/config/environment.rb:5
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:103:in `require_environment!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:22
from script/rails:6:in `require'
from script/rails:6
Any ideas on what I could be missing?
Thanks so much. My clients site is down right now so any help soon would be appreciated.
UPDATE
When I run rake tasks I get this:
Could not find cache store adapter for memory_store (no such file to load -- active_support/cache/memory_store)
I saw this error recently when a shared host moved an application to a new server. I ended up blowing away the application's bundle and reinstalling it, and it seemed to work.
I use Capistrano for deployment, so if you use something else, YMMV. If your application root is this:
/home/jeff/myapp/
with the following subdirectories:
/home/jeff/myapp/current
/home/jeff/myapp/releases
/home/jeff/myapp/shared
the gem bundle is here:
/home/jeff/myapp/shared/bundle
Then I did:
rm -rf /home/jeff/myapp/shared/bundle
then
cd /home/jeff/myapp
bundle install
Once I did this, it seemed to work for me.