I re-installed my active scaffold but got this while trying to start the web server. I got this before too, but I forgot what I had to do to get it to work. I re-installed with
./script/plugin install git://github.com/activescaffold/active_scaffold.git -r rails-2.1 It looks like it's not downloading the right code branch? => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails 2.1.0 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... Exiting /Users/David/Project/Development/RailsDev/svn/pttrading/vendor/plugins/ active_scaffold/init.rb:5:in `evaluate_init_rb': This version of ActiveScaffold requires Rails 2.3 or higher. Please use an earlier version. (RuntimeError) from ./script/../config/../vendor/rails/railties/lib/rails/ plugin.rb:95:in `evaluate_init_rb' from /Users/David/Project/Development/RailsDev/svn/pttrading/ vendor/rails/activesupport/lib/active_support/core_ext/kernel/ reporting.rb:11:in `silence_warnings' from ./script/../config/../vendor/rails/railties/lib/rails/ plugin.rb:91:in `evaluate_init_rb' from ./script/../config/../vendor/rails/railties/lib/rails/ plugin.rb:44:in `load' from /Users/David/Project/Development/RailsDev/svn/pttrading/ config/../vendor/plugins/engines/lib/engines/plugin.rb:77:in `load' from ./script/../config/../vendor/rails/railties/lib/rails/ plugin/loader.rb:33:in `load_plugins' from ./script/../config/../vendor/rails/railties/lib/rails/ plugin/loader.rb:32:in `each' from ./script/../config/../vendor/rails/railties/lib/rails/ plugin/loader.rb:32:in `load_plugins' ... 31 levels... from /Users/David/Project/Development/RailsDev/svn/pttrading/ vendor/rails/railties/lib/commands/server.rb:39 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:in `gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31:in `require' from script/server:3 On Jul 6, 2:34 pm, Kenny Ortmann <[email protected]> wrote: > Can you update your version of active scaffold, I just pused a change to the > version for rails-2.1 > > ~kenny > > On Mon, Jul 6, 2009 at 1:09 PM, redbros <[email protected]> wrote: > > > Still getting the error. > > Does this feature work for you? > > Thanks for your help so far though......I really appreciate it! > > > On Jul 6, 12:56 pm, Kenny Ortmann <[email protected]> wrote: > > > try > > > > config.columns[:name].clear_link > > > config.columns[:name].set_link 'show', :controller => "store" > > > > On Mon, Jul 6, 2009 at 12:10 PM, redbros <[email protected]> > > wrote: > > > > > :( Still the same error. > > > > > On Jul 6, 11:54 am, Kenny Ortmann <[email protected]> wrote: > > > > > try just using > > > > > config.columns[:name].set_link 'show' > > > > > > On Mon, Jul 6, 2009 at 11:39 AM, redbros <[email protected]> > > > > wrote: > > > > > > > Sorry, that was my bad when pasting the code. I was trying out > > > > > > different stuffs before replying. I did have ":controller => > > 'show'" > > > > > > Does it have to do with how I do association in the model? > > > > > > > It shows fine without trying to put links on the rows. > > > > > > > On Jul 6, 11:25 am, redbros <[email protected]> wrote: > > > > > > > Here's my controller code. :product is my model: > > > > > > > > class StoreController < ApplicationController > > > > > > > > active_scaffold :product do |config| > > > > > > > config.columns = > > > > > > > [:code, :name, :make, :model, :year, :equipment_type, :price] > > > > > > > config.actions.exclude :create, :delete, :show, :update > > > > > > > config.columns[:name].set_link 'show', controller => 'store' > > > > > > > end > > > > > > > > @sort_type = '' > > > > > > > @max_per_page = 50 > > > > > > > @tag_names = nil > > > > > > > > # Our simple store index > > > > > > > def index > > > > > > > @title = "Store" > > > > > > > @tags = Tag.find_alpha > > > > > > > @tag_names = nil > > > > > > > @viewing_tags = nil > > > > > > > > @products = Product.paginate( > > > > > > > :order => 'name ASC', > > > > > > > :conditions => Product::CONDITIONS_AVAILABLE, > > > > > > > :page => params[:page], > > > > > > > :per_page => @max_per_page > > > > > > > ) > > > > > > > end > > > > > > > > def search > > > > > > > @search_term = params[:search_term] > > > > > > > @title = "Search Results for: #...@search_term}" > > > > > > > @products = Product.paginate( > > > > > > > :order => 'name ASC', > > > > > > > :conditions => ["(name LIKE ? OR code = ? OR model LIKE ?) > > AND > > > > # > > > > > > > {Product::CONDITIONS_AVAILABLE}", "%...@search_term}%", > > @search_term, > > > > > > > @search_term], > > > > > > > :page => params[:page], > > > > > > > :per_page => @max_per_page > > > > > > > ) > > > > > > > # If only one product comes back, take em directly to it. > > > > > > > if @products.size == 1 > > > > > > > redirect_to :action => 'show', :id => @products[0].code and > > > > > > > return > > > > > > > else > > > > > > > render :action => 'index' > > > > > > > end > > > > > > > end > > > > > > > > def show > > > > > > > @product = Product.find_by_code(params[:id]) > > > > > > > if !...@product > > > > > > > flash[:notice] = "Sorry, we couldn't find the product you > > were > > > > > > > looking for" > > > > > > > redirect_to :action => 'index' and return false > > > > > > > end > > > > > > > @title = @product.name > > > > > > > @images = @product.images.find(:all) > > > > > > > @default_image = @images[0] > > > > > > > @variations = @product.variations.find( > > > > > > > :all, > > > > > > > :order => 'name ASC', > > > > > > > :conditions => 'quantity > 0' > > > > > > > ) > > > > > > > end > > > > > > > > end > > > > > > > > On Jul 6, 11:15 am, Kenny Ortmann <[email protected]> > > wrote: > > > > > > > > > Would you paste your controllers code as well please? > > > > > > > > > On Mon, Jul 6, 2009 at 11:12 AM, redbros < > > > > [email protected]> > > > > > > wrote: > > > > > > > > > > Thanks Sergio for jumping in. > > > > > > > > > > I did use "set_link" like you indicated but got error while > > > > rendering > > > > > > > > > the page. Any ideas? > > > > > > > > > > Showing > > vendor/plugins/active_scaffold/frontends/default/views/ > > > > > > > > > _list_record.rhtml where line #14 raised: > > > > > > > > > > You have a nil object when you didn't expect it! > > > > > > > > > The error occurred while evaluating nil.name > > > > > > > > > > Extracted source (around line #14): > > > > > > > > > > 11: <% column_value = get_column_value(record, column) > > -%> > > > > > > > > > 12: > > > > > > > > > 13: <td class="<%= column_class(column, column_value) %>" > > > > > > > > > > 14: <%= render_list_column(column_value, column, > > record) %> > > > > > > > > > 15: </td> > > > > > > > > > 16: <% end -%> > > > > > > > > > 17: <% if active_scaffold_config.action_links.any? {|link| > > > > > > link.type > > > > > > > > > == :record } -%> > > > > > > > > > > Trace of template inclusion: > > > > > > /vendor/plugins/active_scaffold/frontends/ > > > > > > > > > default/views/_list.rhtml, > > > > /vendor/plugins/active_scaffold/frontends/ > > > > > > > > > default/views/list.rhtml > > > > > > > > > > vendor/plugins/active_scaffold/lib/active_scaffold/helpers/ > > > > > > > > > list_column_helpers.rb:69:in `render_list_column' > > > > > > > > > vendor/plugins/active_scaffold/frontends/default/views/ > > > > > > > > > _list_record.rhtml:14:in > > > `_run_erb_47vendor47plugins47active_scaffold47frontends47default47views47_list_record46rhtml' > > > > > vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/ > > > > > > > > > action_columns.rb:69:in `each' > > > > > vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/ > > > > > > > > > action_columns.rb:56:in `each' > > > > > > > > > ...... > > > > > > > > > > On Jul 6, 10:35 am, "Sergio Cambra .:: entreCables S.L. ::." > > > > > > > > > <[email protected]> wrote: > > > > > > > > > > On Lunes, 6 de Julio de 2009 08:16:08 redbros escribió: > > > > > > > > > > > > Hi, > > > > > > > > > > > > I'm new to ActiveScaffold. Just got it setup and trying > > to > > > > > > customize > > > > > > > > > > > it now. I need some help with the usage of the Action > > Link. I > > > > > > want to > > > > > > > > > > > add a link to a column for each of my record. According > > to > > > > this > > >http://activescaffold.com/docs/api-action-linkIcoulddothatby > > > > > > > > > > > > config.columns[:name].link > > > > > > > > > > > To set a link in a column: > > > > > > > > > > config.columns[:name].set_link 'action_name', :controller > > => > > > > > > > > > 'controller_name' > > > > > > > > > > You can add more options, look at api: action linkhttp:// > > > wiki.github.com/activescaffold/active_scaffold/api-action-link > > > > > > > > > > > To add a link at right (next to edit, delete and show > > links): > > > > > > > > > > config.action_links.add 'action_name', :type => 'record', > > ... > > > > > > > > > > > > Doesn't seem to create a link on the table in each row. > > Also, > > > > how > > > > > > do I > > > > > > > > > > > add restful feature to the link (e.g.: Need to > > > > > > > > > > > add :action, :controller, :id > > > > > > > > > > > > I'm on ActiveScaffold version for rails 2.1 > > > > > > > > > > > > Any help is very much appreciated!!! > > > > > > > > > > > > -Dave > > > > > > > > > > > -- > > > > > > > > > > Sergio Cambra .:: entreCables S.L. ::. > > > > > > > > > > Mariana Pineda 23, 50.018 Zaragoza > > > > > > > > > > T) 902 021 404 F) 976 52 98 07 E) [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
