Radiant 1.1.0 Hurdles

507 views
Skip to first unread message

Mohit Sindhwani

unread,
Dec 21, 2012, 5:28:04 AM12/21/12
to Radiant CMS
Hi Guys,

It's the end of the year and so I thought I would update my sites that are using older versions of Radiant to the latest.  I noticed that there was mention that 1.0 onwards would work with Rails 3 but I couldn't find a simple way to make that work since I noticed that radiant seems to vendor rails 2.3.14.

I'm on Windows and have Ruby 1.8.7, 1.9.2 and 1.9.3 installed.  When in 1.9.3, I tried to install the gem (that worked) and then I tried to run bundle exec bootstrap.  I got an error and then I tried the same after installing the gem in 1.8.7 (switched using pik).  In both cases, I got an error similar to the below

E:\projects\radiant\test_v10>bundle exec rake production db:bootstrap
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/rails/gem_dependency.rb:21.
rake aborted!
ERROR: 'rake/gempackagetask' is obsolete and no longer supported. Use 'rubygems/package_task' instead.

Any ideas what I may be doing wrong?


Finally, a couple of other small things:
* thanks "saalon" for sharing your experience on migrating to 1.0.
* what's the preferred deployment server now?  I'm still deployed on Mongrels for the longest time since I'm on an older version

Best Regards,
Mohit.



Benny Degezelle

unread,
Dec 21, 2012, 12:12:31 PM12/21/12
to radia...@googlegroups.com, te...@onghu.com
Hi Mohit,

About rake/gempackagetask; you should pin rake to <= 10.0.2
I don't know if it's preferred (not much of a sysadmin guy), but I run my instances on nginx + passenger.

You can get around that by using radiant-snippets-extension 1.0.2

I've been meaning to fix both of these but still haven't got around to it.
Also, we are indeed still not on Rails 3.. we really need a new surge of activity here :/


Happy holidays!
B

Op vrijdag 21 december 2012 11:28:04 UTC+1 schreef Mohit Sindhwani het volgende:

Mohit Sindhwani

unread,
Dec 21, 2012, 12:36:37 PM12/21/12
to radia...@googlegroups.com, Benny Degezelle
Hi Benny,

Thanks for the answers.

On 22/12/2012 1:12 AM, Benny Degezelle wrote:
> About rake/gempackagetask; you should pin rake to <= 10.0.2

I will try to do this. I've become a bit rusty on Rails but should be
able to figure out how to pin rake down. Google would help, I'm sure.

> I don't know if it's preferred (not much of a sysadmin guy), but I run
> my instances on nginx + passenger.
I need to prepare the database on Windows since it involves extracting
data from Word documents (using win32OLE) and then inserting into
Radiant using the pages API.

> Also beware about this bug in
> edge: https://github.com/radiant/radiant-snippets-extension/issues/2
> You can get around that by using radiant-snippets-extension 1.0.2
I'm not planning to go onto edge just yet... just want to push up to the
latest version and rework my sites a bit.

> Also, we are indeed still not on Rails 3.. we really need a new surge
> of activity here :/
Wish I could help, but I'm very rusty... but I'm re-entering the world
of Radiant after quite a long break.

Happy holidays to you too!

Best Regards,
Mohit.


Mohit Sindhwani

unread,
Dec 24, 2012, 12:23:36 PM12/24/12
to radia...@googlegroups.com, Benny Degezelle
Hi Benny,

Thanks for your help!

On 22/12/2012 1:12 AM, Benny Degezelle wrote:
> About rake/gempackagetask; you should pin rake to <= 10.0.2
> I don't know if it's preferred (not much of a sysadmin guy), but I run
> my instances on nginx + passenger.
I managed to get this working by adding the rake gem version to Gemfile
and running a bundle update. I bootstrapped the database and started up
Radiant. Compared to 0.8, this looks beautiful, but I'm a bit lost
now.. I need to find what extensions have ended up where now!

I dug up my notes and it seems that I'm using quite a few extensions...
* Admin Breadcrumbs
* Aggregation
* Blog Tags
* Copy Move
* Comments
* CodeRay
* Gallery
* paperclipped
* Reorder
* Radiant Settings -> seems this is now integrated?

Is it best to install extensions from the extension registry directly?

What's the best way to search for extensions packaged as gems?

What would you recommend for multi_site? I have a few sites that are
hosted separately, and it just makes sense to now put them all under the
same instance, I think.

Are you using Radiant with AWS/ S3?

> Also beware about this bug in
> edge: https://github.com/radiant/radiant-snippets-extension/issues/2
> You can get around that by using radiant-snippets-extension 1.0.2
I'll look into this though I"m not on edge.

Sorry for asking a few questions, but it's really been a while!

Happy holidays to you also - Merry Christmas to those who celebrate, and
a happy new year to all!

Best Regards,
Mohit.

Mohit Sindhwani

unread,
Dec 26, 2012, 10:52:35 PM12/26/12
to Drew Prescott, radia...@googlegroups.com
Hi Drew,

On 27/12/2012 1:54 AM, Drew Prescott wrote:
> I'm very very new - I swhitched the rake and it did not work yet. But
> again, I'm new, so it's problably user error on my part. Thanks!

My turn to try to help. I was able to get it to work by switching Rake.

This is what I had to do.

In the Radiant project directory created by doing
cmd> radiant new_project
cmd> cd new_project

there is a file called Gemfile.

Did you edit this to add a different version of Rake?

Could you tell us the following:
* which OS?
* which Ruby version?
cmd> ruby -v
* which Radiant?
cmd> radiant -v
* which rake gems do you have?
cmd> gem list rake

Once we know these, we may be able to help. Since I just got help and
got it working, I'll try to help if I can :)

Best Regards,
Mohit.


Mohit Sindhwani

unread,
Dec 27, 2012, 8:36:52 AM12/27/12
to Drew Prescott, Radiant CMS
Hi Drew,

> Here are my stats - windows 7. ruby 1.9.3p125 - radiant 1.1.0 - rake
> (10.0.3, 10.0.2)

OK, so this is quite similar to what I have here.
The rake version that works for me is 0.9.2.2

You can force install that version by doing:
cmd> gem install rake -v "=0.9.9.2"

Once that is done, go to the directory where you have your radiant
project. That will have a file called Gemfile. Open it in a text
editor and you will see these lines near the top.

> source :rubygems
>
> # If you make any changes in this file, please run `bundle install`.
> # If new versions of your installed gems are available, run `bundle
> update`
>
> gem "radiant", "~> 1.1.0"
> gem "compass-rails", "~> 1.0.3"


Change that by adding in the specific version for rake - so the top few
lines look like this:

> source :rubygems
>
> # If you make any changes in this file, please run `bundle install`.
> # If new versions of your installed gems are available, run `bundle
> update`
>
> gem "rake", "~> 0.9.2.2"
> gem "radiant", "~> 1.1.0"
> gem "compass-rails", "~> 1.0.3"

Now, on your command prompt, do:
cmd> bundle update

and then do the necessary to bootstrap the database.

Hope this helps.

Best Regards,
Mohit.




Mohit Sindhwani

unread,
Dec 27, 2012, 9:16:44 AM12/27/12
to Drew Prescott, Radiant CMS
Hi Drew,

On 27/12/2012 10:07 PM, Drew Prescott wrote:
> it worked!!! thank you!!

Happy to help!

Cheers,
Mohit.


Mohit Sindhwani

unread,
Dec 31, 2012, 1:50:34 PM12/31/12
to radia...@googlegroups.com
First up, Happy New Year all :)

I've been continuing with trying to update to Radiant 1.1.0 in an
attempt to catch up with the times. So far, from what I see, some of
the extensions I needed are already included in 1.1.0 as default.

I think Aggregation and Clipped are already baked in.

I was trying to set up copy_move and was unable to. I tried 2 of the
recommended methods.

1, From the Radiant Extension Registry

# From your RAILS_ROOT run:
<pre>script/extension install copy_move</pre>
# Restart your app

I got the following error.

C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:125:in `chdir': No such file or
directory - T:/UTEMP/copy_move (Errno::ENOENT)
from C:/Ruby193/lib/ruby/1.9.1/fileutils.rb:125:in `cd'
from C:1:in `cd'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/radiant-1.1.0/lib/radiant/extension/script.rb:167:in
`checkout'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/radiant-1.1.0/lib/radiant/extension/script.rb:115:in
`install'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/radiant-1.1.0/lib/radiant/extension/script.rb:11:in
`install'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/radiant-1.1.0/lib/radiant/extension/script.rb:311:in
`initialize'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/radiant-1.1.0/lib/radiant/extension/script.rb:261:in
`new'
from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/radiant-1.1.0/lib/radiant/extension/script.rb:261:in
`execute'
from script/extension:5:in `<main>'

<git is on the path>

2. From Github

# From your RAILS_ROOT run:
cd vendor/extensions
git clone git://github.com/jomz/radiant-copy-move.git ./copy_move
cd ../../
rake radiant:extensions:copy_move:update
# Restart your app

Tried this also.. when I come to the rake step, I get the following
E:\projects\radiant\test_v10\vendor>rake radiant:extensions:copy_move:update
(in E:/projects/radiant/test_v10)
WARNING: It seems you do not have Bundler installed.
WARNING: You can install it by doing `gem install bundler`
Radiant could not be initialized. Have you run `bundle install`?'.

bundler is installed. I am not sure what's wrong. Any thoughts?

Thanks,
Mohit.
1/1/2013 | 2:50 AM.

Mohit Sindhwani

unread,
Dec 31, 2012, 2:46:55 PM12/31/12
to radia...@googlegroups.com
As always, wisdom comes while waiting for someone to respond, so I'll
update my findings.

On 1/1/2013 2:50 AM, Mohit Sindhwani wrote:
> I was trying to set up copy_move and was unable to. I tried 2 of the
> recommended methods.
> 1, From the Radiant Extension Registry
I couldn't find what to do about this method but did solve the second
approach below.

> 2. From Github
>
> # From your RAILS_ROOT run:
> cd vendor/extensions
> git clone git://github.com/jomz/radiant-copy-move.git ./copy_move
> cd ../../
> rake radiant:extensions:copy_move:update
> # Restart your app
>
> Tried this also.. when I come to the rake step, I get the following
> E:\projects\radiant\test_v10\vendor>rake
> radiant:extensions:copy_move:update
> (in E:/projects/radiant/test_v10)
> WARNING: It seems you do not have Bundler installed.
> WARNING: You can install it by doing `gem install bundler`
> Radiant could not be initialized. Have you run `bundle install`?'.

I forgot that the correct rake commands need to be something like this:
> bundle exec rake db:migrate:extensions RAILS_ENV=production
> bundle exec rake radiant:extensions:copy_move:update RAILS_ENV=production

That solves it and it's working now.

Moving on... Part 2 of the Radiant hurdles is closed now!

Best Regards,
Mohit.

Jim Gay

unread,
Dec 31, 2012, 3:29:20 PM12/31/12
to radia...@googlegroups.com
Mohit,

Thanks for reporting all this.
I'm planning to push breaking changes into the master branch soon, so
tracking these things will be really helpful.
Please do report any bugs you find on the github issues

-Jim
--
Write intention revealing code #=> http://www.clean-ruby.com

Jim Gay
Saturn Flyer LLC
571-403-0338

Mohit Sindhwani

unread,
Jan 1, 2013, 11:51:35 AM1/1/13
to radia...@googlegroups.com, Jim Gay
Hi Jim,

Thanks for the note.

On 1/1/2013 4:29 AM, Jim Gay wrote:
> Thanks for reporting all this.
> I'm planning to push breaking changes into the master branch soon, so
> tracking these things will be really helpful.
> Please do report any bugs you find on the github issues

I will do so! I've made the changes to the documentation for
reorder_children and sent a pull request to Benny. I've also fixed an
issue in using previous and next in that extension, and pull request
sent! If I can't find a way to fix something, I'll report issues.

Before I get started (it's 1AM, so I'm off to bed here), are people
facing any problems with "comments" or "galleries" with Radiant 1.1.0?
Those are the next 2 I need to look at in evaluating whether I can move
to Radiant 1.1.0.

Best Regards,
Mohit.


john

unread,
Jan 2, 2013, 9:45:24 AM1/2/13
to radia...@googlegroups.com, Jim Gay, te...@onghu.com
the latest comments gem ought to work

Mohit Sindhwani

unread,
Jan 2, 2013, 10:13:50 AM1/2/13
to radia...@googlegroups.com, john, Jim Gay
Thanks, John.

I was trying that out just as you wrote, and it seems to work fine off
the gem.

On 2/1/2013 10:45 PM, john wrote:
> the latest comments gem ought to work

I've got code_ray also working now, and am in the process of getting
"gallery" to work.
https://github.com/hairballopolis/radiant-gallery

I think I'm getting pretty close to ready to migrating to Radiant 1.1.0
but the road has a few more extensions along the way..

Best Regards,
Mohit.


Mohit Sindhwani

unread,
Jan 6, 2013, 11:40:06 AM1/6/13
to radia...@googlegroups.com
Hello! I'm continuing on with my explorations of a bunch of plugins
that are important as I try to move my sites up to Radiant 1.1.0. So
far, a bunch of things are working fine. From what I see, the following
are Ok:
* Aggregation (built in)
* paperclipped (built in as clipped)
* Copy Move
* reorder_children extension - works fine (minor problem with SQLite3 fixed)
[didn't try Blog Tags because I mainly needed "next, prev"but this also
offers time_ago_in_words]
* cr = CodeRay --> works fine
* co = Comments --> seems to work fine

Now, I am on to Gallery and am facing problems. Is anyone successfully
using Gallery (or equivalent) on Radiant 1.0+?

Specifically, it seems to install fine using:
> Radiant Gallery - https://github.com/hairballopolis/radiant-gallery
> git clone git://github.com/technoweenie/attachment_fu.git
> vendor/plugins/attachment_fu
> git clone git://github.com/hairballopolis/radiant-gallery.git
> vendor/extensions/gallery
> bundle exec rake RAILS_ENV=production radiant:extensions:gallery:install

I've got imagemagick installed (to a directory with no spaces in the
path) and I have mini_magick.
I edited config/extensions/gallery/gallery.yml to include:
path_prefix: public/galleries
processor: mini_magick

restarted the server and went to create a gallery.

"creating" a gallery works fine.
then, I go to the gallery and click on "New File" - select a file from
my filesystem and click on "upload"
get a set of errors:
> /!\ FAILSAFE /!\ 2013-01-07 00:38:52 +0800
> Status: 500 Internal Server Error
> can't convert nil into Integer
> E:/projects/radiant/test_v10/vendor/plugins/attachment_fu/init.rb:7:in
> `sprintf'
> E:/projects/radiant/test_v10/vendor/plugins/attachment_fu/init.rb:7:in
> `make_tmpname'
> C:/Ruby193/lib/ruby/1.9.1/tmpdir.rb:132:in `create'
> C:/Ruby193/lib/ruby/1.9.1/tempfile.rb:134:in `initialize'
> C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.1.3/lib/rack/utils.rb:547:in `new'

Seems to be related to attachment_fu

Does anyone have any thoughts on what I could do?

Best Regards,
Mohit.





john

unread,
Jan 6, 2013, 6:28:47 PM1/6/13
to radia...@googlegroups.com, te...@onghu.com
i don't think attachment_fu was ever updated to be fully compatible with ruby 1.9.x...see https://github.com/technoweenie/attachment_fu/issues/25 for this specific issue

Mohit Sindhwani

unread,
Jan 6, 2013, 9:14:37 PM1/6/13
to radia...@googlegroups.com, john
Hi John,

Thanks for the reply!

On 7/1/2013 7:28 AM, john wrote:
> i don't think attachment_fu was ever updated to be fully compatible
> with ruby 1.9.x...see
> https://github.com/technoweenie/attachment_fu/issues/25 for this
> specific issue
>

I have been to that page a few times, and have tried a few of the things
that are suggested - but no real luck yet.

So far, I have
* changed the implementation of make_tmpname
* changed code within the mini_magick processor for deprecation
* changed code within attachment_fu for deprecation
* made a couple of other minor changes

Now, it claims to upload correctly but the thumbnails are all the same
size as the original. Also, when I go to the view of the specific
gallery, I get an error of this kind:
> NoMethodError in Gallery_items#index
>
> Showing
> vendor/extensions/gallery/app/views/gallery_items/_item.html.erb where
> line #3 raised:
>
> undefined method `*' for nil:NilClass
>
> Extracted source (around line #3):
>
> 1: <div class="item" id="item_<%= item.id %>">
> 2: <%= item_label(item) %>
> 3: <%= item_preview(item) %>
> 4: <%= item_buttons(item) %>
> 5: <div class="credits" id="item_<%= item.id %>_credits"
> style="display:none;"><%= "#{item.credits}" %></div>
> 6: <div class="description" id="item_<%= item.id %>_description"
> style="display:none;"><%= "#{item.description}" %></div>

Digging down, this comes from the function
E:/projects/radiant/test_v10/vendor/extensions/gallery/app/models/gallery_item.rb:182:in
`proportional_resize'

which says:
> [(width * scale_ratio).to_i, (height * scale_ratio).to_i]

so, either width or height is nil.

I will have to backtrack and find why this is happening.

Is anyone using gallery or something else for picture galleries in
Radiant 1.0+?
Best Regards,
Mohit.



Mohit Sindhwani

unread,
Jan 10, 2013, 9:11:50 PM1/10/13
to radia...@googlegroups.com, john
Hi All,

If you're at the edge of your seat wondering how this is going, I'll
just do a quick update.

On 7/1/2013 10:14 AM, Mohit Sindhwani wrote:
> So far, I have
> * changed the implementation of make_tmpname
> * changed code within the mini_magick processor for deprecation
> * changed code within attachment_fu for deprecation
> * made a couple of other minor changes
>

After a long stint at debugging, tracing, and experimenting, I think I
have found all the changes that are needed to make Gallery work with
RMagick under Windows (other processors may also work on other
platforms, but mini_magick and image_science didn't work for me). I
made changes all over the place to attachment_fu and gallery - so, in
the weekend, I might compare against the master versions of the two and
see which changes are actually needed so that I can push my changes (or
at least, have it available on my fork at Github).

So, my progress on the migration is now:
* Aggregation - built in
* paperclipped - built in with <clipped>
* Copy Move --> copy_move extension
* Reorder --> reorder_children extension
* CodeRay --> works fine
* Comments --> gem seems to work fine
* 111 = radiant 1.1.1
* Radiant Settings
* help
* Gallery

Next up, I need to out:
* something for multiple sites from the same instance (important!)
* event calendar
* functionality for "contact me" forms - "forms" or "radiant-mailer"
(important!)
* my simple code for managing pages in multiple languages

I'll update once I have this working. Once the migration is done, I can
move my blog from mephisto to Radiant and blog this experience!

Thanks for all your support.

Best Regards,
Mohit.

Anton Aylward

unread,
Sep 2, 2015, 10:16:01 PM9/2/15
to Radiant CMS, te...@onghu.com
I'm getting this same error with 1.1.4, Ruby 1.9 and just about every iteration or Rails I try.
Reply all
Reply to author
Forward
0 new messages