Displaying 20 results from an estimated 26 matches for "t7cgfwhwgcvwdfbkkxig".
2009 Jun 02
9
XML::LibXML::Reader
is there anybody who knows how we can get child values using libxml
(Reader class)
def xml_import_to_brands
require''xml''
reader = XML::Reader.file(''c:/brands.xml'')
.
.
.
2010 Dec 25
6
undefined local variable or method?
I have:
<%= form_for(@supplier) do |f| %>
.......
......
<%= render ''sector_categories'', :locals => {:f => f} %>
in _sector_categories partial I have:
<div class="field">
<div id="category_update">
<% for category in @categories %>
<%= f.check_box :category_ids[], category.id,
2010 Jul 20
4
MySQL index question
I am trying to speed up some DB operations and perhaps have gone overboard
with indexes. Does MySQL usually use only one index per query and simply
match keys on the results of the indexed first part? For example:
DELETE FROM tokens WHERE 6813946236211560448 <= fnv AND fnv < 6818449835838930944 AND updated_at<''2010-06-20 14:08:55'' AND occurrences=0;
If I understand
2010 May 25
2
Rails 2.3.6 and Authlogic 2.1.4 or 2.1.3
In the test environment, logging out and back in is not working for me. The
log for the first login looks like this:
Processing UserSessionsController#create (for 127.0.0.1 at 2010-05-24 19:53:57) [POST]
Parameters: {"user_session"=>{"remember_me"=>"true", "password"=>"[FILTERED]", "login"=>"test"},
2010 Oct 04
4
http caching a dynamic page
Is it possible to take advantage of http caching/proxy caching with
dynamic pages? i.e. pages with section/part that can change over time
but certain part of the page remain the same. I would rather not keep
re-rendering the static part but insure the dynamic part are rendered
with fresh data.
I am using memcached mostly as an object store that I can minimize db
hits but I still am rendering a
2010 Apr 15
2
Linux/Unix DNS question
While traveling, I found a motel with WiFi where Firefox and the DNS utilities,
nslookup and dig, worked as expected, but wget, termtter (a CLI Twitter
client), my Ruby on Rails applications, and several other programs could not
resolve any domain names (getaddrinfo error, from memory). If I plugged the
IP address obtained with nslookup into /etc/hosts, they worked as expected.
Could anyone
2010 Feb 10
7
undefined method join
Hey all,
I get an undefined method `join'' for #<String NoMethodError.
student.rb
has_one :student_fail
attr_accessor :student_fail_attribute
#controller
def student_fail
@student = @student.find params[:id]
def update_student_fail
@student.build_student_fail params[:student][:student_fail_attribute]
if @student.save
#view
form_for @student do |f|
2009 May 26
6
dump and import MySQL table w/ accents
I am switching to a composite primary key (string and user ID) from the Rails
conventional auto-incrementing integer primary ID. The table is large (2.5
million records) and I''d rather not discard the contents. The
composite_primary_key gem doesn''t appear to support altering the table with a
migration to do its magic, only creating a table from scratch. So I dumped
the table
2009 Apr 15
2
Backspace in strings and patterns
Interesting. Not what I expected. This is Ruby 1.8.6.
> irb
irb(main):001:0> str = "abx\bc"
=> "abx\bc"
irb(main):002:0> str.length
=> 5
irb(main):003:0> s = str.sub(/.\b/, '''')
=> "ab\bc"
irb(main):004:0> s.length
=> 4
irb(main):005:0> s = str.sub(/.\x08/, '''')
=> "abc"
2008 Sep 20
2
NameError: uninitialized constant Inflector
I follwed the example here:
http://dekstop.de/weblog/2005/12/rails_inflector_in_ruby_scripts/
#!/usr/bin/ruby
require ''rubygems''
require ''active_support/inflector''
puts Inflector.singularize(''inflections'')
I loaded it into irb and wrote a killer script both of which worked
perfectly for weeks.
Now when I try and run the script or run
2009 Aug 24
5
extract keywords from string
hi -
i have strings that i need to extract keywords from. the string might
have html tags, urls, etc. i need to extract the keywords from the
string. i imagine i''m not the first guy to have to tackle this
problem. is there a gem i can use or anyone have any ideas how to
approach this?
thanks,
dino
2008 Jun 09
16
display "..." for text LONER than a certain length...
I am working on an app that has user generated content. What I''d like
to do, is display X characters of, say, a title and put "..." for the
rest. This sounds like something you see in soc networking type app
and wondering if there is some code out there to do this. thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed
2008 Dec 17
9
Rails 2.2.2 and globalize - undefined method `render_file' for class `ActionView::Base' (NameError)
Looks like globalize (1.2) is not compatible with rails 2.2.2. I am
getting:
''
=> Booting Mongrel (use ''script/server webrick'' to force WEBrick)
=> Rails 2.2.2 application starting on http://0.0.0.0:3003
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3003
** Starting Rails with development environment...
2012 Oct 10
4
How do we get the End of Line date for the gems which we are using Ruby on Rails?
Hi All,
I want to know the EOL date for the below gems for ROR. Can anyone help me
how to find the EOL dates
- authlogic
- will paginate
- oauth-plugin 0.3.14
- statistics 0.1.1
- YUI
- cucumber 0.6.4
- cucumber-rails 0.3.0
- rspec 1.3.0
- rspec-rails 1.3.2
- webrat 0.7.0
- factory-girl 1.2.4
- database_cleaner 0.5.0
- SSL requirement
- calender_select
2011 Sep 05
2
Can't upgrade Rails - Failed to build gem native extension.
I am new to Rails and attempting to upgrade Rails on my Mac to latest
version so that I can follow the rails tutorial, but I just can''t seem
to get anywhere.
When I attempt to update rails with: $ sudo gem update rails -y, I
receive the following error.
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
Any ideas what I am doing wrong, or what I can do
2009 Jan 02
5
Very odd NoMethodError/stack overflow....
I''m getting this very weird error and I can''t figure out what the
problem is. I''m using acts_as_commentable. Basically, I have a partial
with this code in it:
<div id="<%= ''#{comment.commentable_type}_comment_#
{comment.commentable_id}'' %>" class="comment">
<dl>
<dt><%= link_to comment.user.login,
2010 Mar 31
6
any body can help me ?? why is this happen??
Hii All
I use ruby 1.8.7
I run irb and type:
a = (0.29 * 100).to_i
the result is 28
why??????
could u explain to me.. Please????
THank you
--
Senior Rails Developer
Anton Effendi - Wu You Duan
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2009 Nov 26
4
Is this a bug?
Hello all, while I''m using acts_as_audited(on jruby platform),
after vendored the acts_as_audited, it reports some error,
line 167,
# Start observing the declared classes and their subclasses.
def initialize
Set.new(observed_classes + observed_subclasses).each { |klass|
add_observer! klass } #this line
end
after some trace shows this one, when observed_classes is empty, will
2011 Apr 05
6
How to achieve Google Reader-like layout in Rails?
Hi
I''m trying to create a web application with a UI that is fundamentally
similar to Google Reader, in Rails 3 and probably with some Javascript
toolkit (jQuery?). I''m new to web development (my background is in desktop
application development), however, and after some experimentation with CSS
layout I''m frankly unsure of how to achieve the desired layout. Therefore
2009 Oct 01
9
Strange problem with "and" - "&&"
Hello
I have a strange problem with this code:
<%unless (@students.empty? and params[:commit].nil?) %>
<%="test"%>
<%= render :partial => ''results'' %>
<% end %>
Even though in some cases @students.empty? returns false and params
[:commit].nil? returns true (or the opposite), it displays the test
and the render area.
I put before and