I'm experiencing a really weird issue. When I fork the active_admin gem and use the forked, unchanged version it gives me the following error:
Sprockets::CircularDependencyError in Active_admin/devise/sessions#new
/Users/Victor/.rvm/gems/ruby-1.9.2-p180/bundler/gems/active_admin-916ecdd04e3c/app/assets/javascripts/active_admin/base.js has already been required
Extracted source (around line #12):
9: <%= stylesheet_link_tag style.path, style.options %>
10: <% end %>
11: <% ActiveAdmin.application.javascripts.each do |path| %>
12: <%= javascript_include_tag path %>
13: <% end %>
14:
15: <%= csrf_meta_tag %>
When I use the original version there are no errors. How is this possible if the two versions are identical?
Yes.you can remove the line
//= require_directory ./
in
/.rvm/gems/ruby-1.9.2-p180/bundler/gems/active_admin-916ecdd04e3c/app/assets/javascripts/active_admin/application.js
Remove active_admin.js from your app/assets/javascripts folder - it looks like it is no longer needed.
Related
Well, I hate using SO as just a syntax checker, but for the life of me I cannot figure out why I get thi error
where line #8 raised:
unexpected $end, expecting keyword_end
Here is the offending code:
5: <%= f.input :allele2 %>
6: <%= f.input :run_date %>
7:
8: <%=f.association :gmarkers, :collection => Gmarker.all(:order => 'marker'), :prompt => "Choose a Marker", :label => "Marker" %>
9:
I'm using the SimpleForm gem, and am not too familiar with it yet (obviously!)
tia,
--rick
You're missing an <% end %> after your last line there, line 8.
Im getting the following error message:
undefined method `user_registration_path' for #<#<Class:0x10f227cd8>:0x10f5f6d50>
Extracted source (around line #3):
1: <h2>Sign up</h2>
2:
3: <%= form_for(resource_name, resource, :url => registration_path(resource_name)) do |f| %>
4: <%= f.error_messages %>
5: <p><%= f.label :email %></p>
6: <p><%= f.text_field :email %></p>
I checked everything and i didnt found an error, i had just created the project and installed the plugin.
I was using a old version of the devise plugin in the new version of the ror. =x
How to solve kaminari problem with haml? I m using haml haml (3.1.4)
and kaminari 0.13.
my index file looks like:
%h1 Listing customers
=paginate(#customers)
%table.index-list
%tr
%th Name
.....
but i m getting an error
undefined local variable or method `prev_span_tag'
for #<Kaminari::Helpers::Paginator:0xa848978>
Extracted source (around line #10):
7: paginator: the paginator that renders the pagination tags inside
8: -%>
9: <%= paginator.render do -%>
10: <nav class='pagination'>
11: <%= current_page > 1 ? prev_link_tag : prev_span_tag %>
12: <% each_page do |page| -%>
13: <% if page.current? -%>
Thanks.
I found this question : Rails heroku help kaminari view error. So i'd delete (and backup if necessary) your current views and regenerate them again
I really can't figure out why I can't access the user_id field for the class Post. I have it as a field in my database (I can see it, and it isn't blank. Yet for some reason, I'm getting this error:
undefined method `user_id' for #<Class:0x103497448>
Extracted source (around line #10):
7: <h2>Topics</h2>
8: <% #board.topics.each do |topic| %>
9: <% #post = topic.posts(1) %>
10: <b><%= User.find(#post.user_id).username %> says <%= link_to topic.subject, [#board, topic] %></b><br />
11: <% end %>
12: <% end %>
13:
topic.posts(1) will return an array. Hence #<Class:0x103497448>
The right way to get the first post for a topic would be
9: <% #post = topic.posts.first %>
10: <b><%= User.find(#post.user_id).username %> says <%= link_to topic.subject, [#board, topic] %></b><br />
Try <% #post = topic.posts.limit(1) %>
NoMethodError in Projects#index
Showing /home/dave/Documents/exercises/todo/app/views/layouts/application.html.erb where line #18 raised:
undefined method `find' for Symbol:Class
Extracted source (around line #18):
15:
16: <div id="container">
17: <div id="user_nav">
18: <% if user_signed_in? %>
19: Sign in as <%= current_user.email %>. Not you?
20: <%= link_to "Sign out", destroy_user_session_path %>
21: <%else %>
why am i getting this error message?
undefined method `find' for Symbol:Class
im using rails 3.0.7 and devise 1.1.rc0
based on this tutorial http://media.railscasts.com/videos/236_omniauth_part_2.mov
what a lame i just bundle installed devise 1.3.4 and changed secret_token or clear sessions db and *then up and running*
just incase some people might investigate some the cause of this problem just to let you know.