views:

100

answers:

1

Am trying to use Facebox with rails, it's not working at all.

I have added all files to there right places:

  • Install FaceboxRender gem install FaceboxRender
  • Download jQuery
  • Download facebox at http://famspam.com/facebox
  • Copy facebox js file to /public/javascripts/
  • Copy facebox css file to /public/styleshees/
  • Copy facebox all image files to /public/facebox/
  • Update your layout’s stylesheet_link_tag and javascript_include_tag to add these js, css files

I have included FaceboxRender in my application controller

what am I missing here

this is a link am using just to test things:

<%= facebox_link_to 'Posts', posts_path %>

error:

can't convert Symbol into String
Extracted source (around line #1):

1:  <li><%= facebox_link_to 'Posts', posts_path %></li>
2: 
3: 
4: <% @photos.each do |photo| %>

I've tried adding config.gem "facebox-render" to my config/environment.rb but i just get errors!

Although I have installed the gem already, I ran rake gems:install I get no problems as it's installed, but when I

rake db:migrate

I get this error:

Missing these required gems:
  facebox-render  

You're running:
  ruby 1.8.7.174 at /opt/local/bin/ruby
  rubygems 1.3.6 at /Users/Mister/.gem/ruby/1.8, /opt/local/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems. 

Any help will be great!

Thanks

Dan

A: 

The issue is this line: 1:

  • <%= facebox_link_to 'Posts', posts_path %>
  • Change posts_path to the old style:

  • <%= facebox_link_to 'Posts', :url => {:controller => 'posts', :action => 'index'} %>
  • Chard Gonzales