>Hi All,
>Im playing around with Jugganaut but stuck at the first step.
>Seems the jugganaut push server requires json (which I have installed)
>but it cant find it.
...>Anyone any ideas as to what could be wrong?
>Thanks
>Jonathan
Hi Jonathan,
I had the same problem, and fixed it! Here''s how...
(I posted this fix on my blog as well:
http://galtzo.blogspot.com/2006/08/json-has-colon-problem.html)
The problem:
You install JSON, and try to run the juggernaut push server, and think
everything''s gonna be cool... but then:
[pboling@host my_app]$ sudo gem install json
Successfully installed json-0.4.1
Installing ri documentation for json-0.4.1...
lib/json/editor.rb:977:50: '':'' not followed by identified or
operator
Installing RDoc documentation for json-0.4.1...
lib/json/editor.rb:977:50: '':'' not followed by identified or
operator
And get more baffling errors...
[pboling@host my_app]$ ruby script/push_server
script/push_server:37:in `require'': no such file to load -- json
(LoadError)
from script/push_server:37
So you fix them!
[pboling@host my_app]$ cd /usr/lib/ruby/gems/1.8/gems/
(Some systems may be /usr/local/lib... or something else)
All of your installed gems should be sitting here:
[pboling@host gems]$ ls
actionmailer-1.2.3 activerecord-1.14.3 json-0.4.1
rails-1.1.4 actionpack-1.12.3 activesupport-1.3.1
mysql-2.7 rake-0.7.1 sources-0.0.1
actionwebservice-1.1.4 fcgi-0.8.7 rubygems-update-0.9.0
[pboling@host gems]$ cd json-0.4.1/lib/json/
There''s the offending editor.rb file!
[pboling@host json]$ ls
Array.xpm FalseClass.xpm json.xpm NilClass.xpm String.xpm
editor.rb Hash.xpm Key.xpm Numeric.xpm TrueClass.xpm
Edit it and remove the offending colon:
[pboling@host json]$ sudo vi editor.rb +977
Change this:
@treeview.signal_connect(:''cursor-changed'') do
to this (delete colon):
@treeview.signal_connect(''cursor-changed'') do
and save... (:wq)
[pboling@host json]$ cd ../../
There''s the install file!
[pboling@host json-0.4.1]$ ls
bin GPL lib linecover.db README TODO
CHANGES install.rb linecover_config.rb Rakefile tests VERSION
Run the install file:
[pboling@host json-0.4.1]$ sudo ruby install.rb
It will do this:
cd bin
install -c edit_json.rb /usr/bin
cd -
cd lib
install -c json.rb /usr/lib/site_ruby/1.8
mkdir -p /usr/lib/site_ruby/1.8/json
install -c json/editor.rb /usr/lib/site_ruby/1.8/json
install -c json/json.xpm /usr/lib/site_ruby/1.8/json
cd -
Then start your Juggernaut push_server:
[pboling@host igacc]$ ruby script/push_server
Starting server...
Server is on...
IP: 0.0.0.0
Port: 3100
Computer Name: 0.0.0.0
Allowed IP for rails:
Serving...
And you are now much more awesome than you were 2 minutes ago!
--
(**********************************************************
* Peter H. Boling
* Software Engineer - Legislative Services Agency
* Web Application Designer - PanEther, LLC
* email: peter.boling@gmail.com
* blog: http://galtzo.blogspot.com/
* languages: English, Spanish, Portuguese
***********************************************************)