I am just getting started with Radiant and am trying to use it as a Rails 3 engine. When I try to install an extension, I get an error about RAILS_ROOT not being defined. This was easy enough to resolve (I added a RAILS_ROOT constant in config/boot.rb of my app). However, the RADIANT_ROOT constant is also undefined. Here is the stacktrace: mario:(git)strangeloop[radiant_engine]/$ script/extension install forms /Users/mario/.rvm/gems/ruby-1.8.7-p302/bundler/gems/ radiant-1e7494558a8e/lib/radiant/extension/script.rb:286:in `extension_paths': uninitialized constant Radiant::Extension::Script::Util::RADIANT_ROOT (NameError) from /Users/mario/.rvm/gems/ruby-1.8.7-p302/bundler/gems/ radiant-1e7494558a8e/lib/radiant/extension/script.rb:278:in `installed?' from /Users/mario/.rvm/gems/ruby-1.8.7-p302/bundler/gems/ radiant-1e7494558a8e/lib/radiant/extension/script.rb:304:in `initialize' from /Users/mario/.rvm/gems/ruby-1.8.7-p302/bundler/gems/ radiant-1e7494558a8e/lib/radiant/extension/script.rb:261:in `new' from /Users/mario/.rvm/gems/ruby-1.8.7-p302/bundler/gems/ radiant-1e7494558a8e/lib/radiant/extension/script.rb:261:in `execute' from script/extension:5 Since I am trying to use Radiant as a Rails engine, what should the RADIANT_ROOT be? Should I freeze the radiant gem (and put it under vendor/gems)? --Mario
on 2010-11-27 23:35
on 2010-11-28 18:16
On Nov 27, 2010, at 5:34 PM, Mario Aquino wrote: > Since I am trying to use Radiant as a Rails engine, what should the > RADIANT_ROOT be? Should I freeze the radiant gem (and put it under > vendor/gems)? Radiant as an engine is still under construction and I can't recommend using it for anything real at the moment. The 0.9.1 gem is only compatible with Rails 2, but that's the latest stable release. For hacking on the rails3 branch, I've been unpacking it into lib/radiant and pointing Bundler there with gem "radiant", :path => "lib/radiant".
on 2010-11-28 21:07
I'd like to do what you suggest and perhaps I am going about it the wrong way. I thought what you were suggesting below was creating a local gem build of the radiant rails3 branch and then unpacking that in a 'lib/radiant' directory within the project I am working in. Is that what you were suggesting or something different? I tried doing what I just described, and I got an error trying to run rake. Here's what I did: mario:(git)radiant[mario-rails3]/$ rake -P | grep gem rake aborted! no such file to load -- dataset/tasks /Users/mario/tmp/radiant/radiant/Rakefile:7 (See full trace by running task with --trace) I had a look in the Rakefile and saw that on line 7, it is trying to require 'dataset/tasks'. There isn't a dataset directory with a tasks.rb file anywhere that could find in the project. Do I need to have something else in place to have the rail3 branch working? I was hoping that all I needed to do was: rake radiant:gem and have the local branch built into a gem that I could unpack in my project (per your suggestion), but it seems that creating a gem from the branch isn't working out of the box (unless there is another way to do it). --Mario
on 2010-11-28 21:34
Another data point is that if I try to run rake from bundler, I get: mario:(git)radiant[mario-rails3]/$ bundle exec rake -P (in /Users/mario/tmp/radiant/radiant) rake aborted! uninitialized constant Radiant /Users/mario/tmp/radiant/radiant/Rakefile:9:in `<top (required)>' (See full trace by running task with --trace) So it gets past the require 'dataset/tasks', but blows up on the line that says: Radiant::Application.load_tasks --Mario
on 2010-11-29 18:51
On Nov 28, 2010, at 3:05 PM, Mario Aquino wrote: > I thought what you were suggesting below was creating a > local gem build of the radiant rails3 branch and then unpacking that > in a 'lib/radiant' directory within the project I am working in. You don't need to build the gem. Just clone the rails3 branch into lib/radiant of your current project and load Radiant from there. My Gemfile looks like this: gem 'rails', '3.0.1' gem 'sqlite3-ruby', :require => 'sqlite3' gem 'radiant', :path => 'lib/radiant' gem 'compass' > Do I need to > have something else in place to have the rail3 branch working? A lot of the Rails 3 branch simply doesn't work yet. That includes the rake tasks. As I said before, the Rails 3 conversion has just begun and I guarantee you'll continue to run into problems.
on 2010-11-30 21:49
I think I have been bitten by this as well I've tried a rake production db:bootstrap which runs ok until trying to recreate the admin user in which I get: rake aborted! undefined method `home_path' for #<User:0x6fe0ce3b4dd0> Doing some digging I found references to making sure there are routes in place, but this might be a red herring. I have the following versions of rails installed (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2) Looking at the reference to gemfile (which I am going to have to read up on) in Joshua's previous mail I was wondering if it would be possible to fix the rails version to say 2.3.8? If so what else should I be aware of? I don't think I can remove 3.0.3 as I'm not sure if it is in mine or from Dreamhost's installation. Marc
on 2010-11-30 22:03
On Tue, Nov 30, 2010 at 2:48 PM, Marc <marc.boschma@gmail.com> wrote: > I was wondering if it would be > possible to fix the rails version to say 2.3.8? radiant has a frozen version of rails in the gem (and repo in case you don't use the gem). so none of your rails gems matter to radiant (you could uninstall them all and radiant will still run).
on 2010-11-30 22:09
That is good to know, and now means I have to work out why I am getting: undefined method `home_path' for #<User:0x6fe0ce3b4dd0> when creating the admin user
on 2010-11-30 22:12
looks like it might be coming from the member extension (or not it was just the first hit in google). https://github.com/Aissac/radiant-member-extension
on 2010-12-01 01:14
I think the culprit was User Home. Disabled it and db:bootstrap happened, although some of the tables for extensions didn't get created so the site is fragile at the moment Almost at the point of starting over with the hope that it works out better than the first time Marc
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.