Jekyll Serve not working.Uninitialized constant. Windows 8 - 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.

Related

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.

Cap generates "cannot load such file -- Bundler/capistrano (LoadError)"

I am developing a RoR application on two different machines. The iMac works fine, and all Capistrano tasks work as expected. The macbook-pro, however, generates the following error for any cap task (even "cap -T")
luna:shootingstars sjf$ cap -T
/Users/sjf/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- Bundler/capistrano (LoadError)
from /Users/sjf/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:152:in `require'
from ./config/deploy.rb:30:in `load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:93:in `instance_eval'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:93:in `load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:89:in `load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:86:in `block in load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:86:in `each'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:86:in `load'
from Capfile:8:in `load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:93:in `instance_eval'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:93:in `load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:172:in `load_from_file'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:89:in `load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:86:in `block in load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:86:in `each'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/configuration/loading.rb:86:in `load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/cli/execute.rb:65:in `block in load_recipes'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/cli/execute.rb:65:in `each'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/cli/execute.rb:65:in `load_recipes'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/cli/execute.rb:31:in `execute!'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.9.0/bin/cap:4:in `<top (required)>'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/bin/cap:19:in `load'
from /Users/sjf/.rvm/gems/ruby-1.9.3-p0/bin/cap:19:in `<main>'
As near as I can tell, everything is set up the same on the two machines. The only difference I can find is that on the working machine...
sol:shootingstars sjf$ gem which bundler
/Users/sjf/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.0.21/lib/bundler.rb
while on the failing machine...
luna:shootingstars sjf$ gem which bundler
/Users/sjf/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.0.21/lib/bundler.rb
Note the "#global" in the ruby path.
Other than that, both machines are running
rvm version 1.10.2
ruby version 1.9.3p0
bundle version 1.0.21
capistrano version 2.9.0
rails version 3.2.1
Thanks for any help
Well, I finally figured out the answer to my own question. Turns out the Macbook Pro with the problem had "case sensitivity" turned on in the filesystem. "Mac OS Extended (Case-sensitive, Journaled)"
Changing the deploy.rb file line from...
require "Bundler/capistrano"
to
require "bundler/capistrano"
fixed the problem! (Yay!)

Ruby/Rails Debug in Aptana - rake not found

I am really excited today because today I found an error which no one else has found in the history of the internet.
I am trying to learn how to use Aptana Studio 3 for debugging so in my application's root directory, I right click on config.ru and click on debug server and this is what is produced on the console:
List item
Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.11) listens on 127.0.0.1:50122
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs'
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:451:in `block in find_in_unresolved'
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:451:in `map'
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:451:in `find_in_unresolved'
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:43:in `require'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/dsl.rb:1:in `'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/definition.rb:17:in `build'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler.rb:138:in `definition'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler.rb:126:in `load'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/setup.rb:17:in `'
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
C:/triton2/config/boot.rb:6:in `'
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
C:/triton2/script/rails:5:in `'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:112:in `debug_load'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:112:in `debug_program'
c:/Ruby192/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/bin/rdebug-ide:87:in `'
c:/Ruby192/bin/rdebug-ide:19:in `load'
c:/Ruby192/bin/rdebug-ide:19:in `'
Uncaught exception: Could not find rake (>= 0.8.1) amongst []
Also, in the terminal I get this:
David#DAVID-PC /c/triton2
gem install rake
Successfully installed rake-0.9.2.2
1 gem installed
Installing ri documentation for rake-0.9.2.2...
Installing RDoc documentation for rake-0.9.2.2...

Error - uninitialized constant Devise::IndifferentHash (NameError)

working in rails, and am trying the command 'rails g spree:site' as described in section 4.5 of the Spree getting Started Guide. not sure what the problem is, I am running rails 3.1.1.rc2 on a windows 7 platform. The error is below.
C:/Ruby192/lib/ruby/gems/1.9.1/gems/spree_auth-0.40.0/lib/spree_auth.rb:17:in `a
ctivate': uninitialized constant Devise::IndifferentHash (NameError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1.rc2/lib/act
ive_support/callbacks.rb:413:in `_run_prepare_callbacks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1.rc2/lib/act
ive_support/callbacks.rb:81:in `run_callbacks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.1.1.rc2/lib/action
_dispatch/middleware/reloader.rb:46:in `prepare!'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/ap
plication/finisher.rb:41:in `block in <module:Finisher>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:29:in `instance_exec'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:29:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:54:in `block in run_initializers'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:53:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:53:in `run_initializers'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/ap
plication.rb:96:in `initialize!'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/ra
iltie/configurable.rb:30:in `method_missing'
from C:/Users/Edu/RubymineProjects/myStore/config/environment.rb:5:in `<
top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/ap
plication.rb:83:in `require_environment!'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/co
mmands.rb:22:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I had the same problem with rails 3.1. The solution was to put the following lines in my GEMFILE:
# ===:git with the repository's url that works=== #
gem 'spree', :git => 'git://github.com/spree/spree.git'
This should help in your case, too.
#jhsilva007 : Specifying this line ( gem 'spree', :git => 'git://github.com/spree/spree.git' )
definitely helped me resolving of error.
I think this line will get the latest version of the spree from github. What if I just want the particular version number of spree. I mean I don't like to get the beta version.