Displaying 20 results from an estimated 70000 matches similar to: "find conditions issue"
2012 Feb 07
10
Encoding error
Hello, I have in my db a register what have special characters, and when
I try to put on my form to edit this values, this happens:
incompatible character encodings: UTF-8 and ASCII-8BIT
Extracted source (around line #4):
1: <%= form_for :group, :url => { :action => "update" } do |f| %>
2: <%= utf8_enforcer_tag %>
3: <label>Nome do grupo</label>
2010 Dec 06
10
testing chapter: agile web dev withrails
I am working my way through Agile web development with rails and I''m in
the testing chapter.
when I run the following test(or any other test)
I''m new and not sure where to start looking.
require ''test_helper''
class ProductTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
I
2010 Sep 02
7
unable to upload larger files
hii,
i am trying to upload some files to filesystem using rails application
when i use small size file everything is perfect but i when goes for
larger files i got error
this is my code
#this model file
class DataFile < ActiveRecord::Base
def self.save(upload)
name = upload[''datafile''].original_filename
directory = "//192.168.147.17/Smruti/streams"
#
2013 May 09
7
why i am getting this error
hi!! i am a newbie in ROR, I am getting this error i understand what the
error says but don''y know why i am getting this error.
ActiveRecord::StatementInvalid in UserController#new
Mysql::Error: Table ''user.users'' doesn''t exist: SHOW FULL FIELDS FROM
`users`
def new
@user = User.new
end
def edit
my user controller file contains :-
class
2010 Apr 21
12
Using AR.connection.execute(sql) -- messing with my string?
Does ActiveRecord.connection.execute(string) perform any modifications
on the given string? If so, what quoting do I need to add?
Here''s why: I''m trying to use execute(string) to load a stored
procedure. I can hand-load the procedure without error (i.e. via
dbconsole), but when I call the function below, it throws the error:
====
ActiveRecord::StatementInvalid: Mysql::Error:
2010 Sep 12
11
Rails 3: finding a record by name in multilingual app
Hello,
I upgraded my application from Rails 2 to Rails 3 and ran into a
problem. In rails 2 I could use the english name of the record to find
it like:
Page.find_by_name("Welcome")
even though the user chose German as the language (which of course
showed the German welcome page.
Eversince I switched to Rails 3 (default_locale still :en) I can''t find
anything by giving the
2011 Apr 27
6
rubygems (LoadError)
I''m trying to set up a cron job with a runner that calls a method in one
of my models. I''m using javan''s whenever gem to do this and I''m running
CentOS on my server. Whenever the cron executes though I''m getting the
following error:
`require'': no such file to load -- rubygems (LoadError)
The method uses the ''mail'' and
2010 Oct 11
8
Nooby Stuck - "has_and_belongs_to_many" relationship
trying to set up a "has_and_belongs_to_many" relationship
would very much appreciate the help, not sure what im doing wrong at all.
Scheme.rb
class Scheme < ActiveRecord::Base
validates :schemename, :presence => true
belongs_to :user
has_many :levels, :dependent => :destroy
has_and_belongs_to_many :works
end
Work.rb
class Work < ActiveRecord::Base
2012 Dec 13
23
make rails connect with database
i''m newbie in rails. i have problem with how to connect rails with
database. before i can connect it with command
"rake db:create" to create database.
and "rake db:migrate" to migrate schema to database.
but, i want to connect rails with database that i have before, not
create it via rails. can you help me?
--
Posted via http://www.ruby-forum.com/.
--
You received
2012 Sep 26
2
Bundle Install ERROR: ERROR: Failed to build gem native extension.
Hello,
I''m trying to setup postgreSQL onto rails on linux and when I type
bundle install this is the error that i get. I guess its not finding
the files
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.
/home/taka/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for bzlib.h... no
checking for BZ2_bzWriteOpen() in -lbz2... no
***
2010 Feb 24
4
"Sequence does not exist" for joined model
Hello all,
I''m in my 5th month on Ruby on Rails and still learning.
I have an application that works fine in sqlite3 and then the boss says
he wants it migrated to Oracle.
Now, I know very little about Oracle, enough to get into trouble.
When I did the migration everything went haywire. Well, I''ve refactored
several problems and now I have another.
I have two models with a
2011 Apr 20
11
Mac Phusion Passenger Pane not working
I have a feeling that this is something centered around my
apache/Passenger configurations but everything seems to check out.
Another off the hand problem I''m having, and might be a clue is w/ my
Passenger Pane. I installed the Phusion Passenger Pane and every time
I try to add an entry, I get this error:
"Your changes couldn’t be saved
See the Console log for details."
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
2010 Aug 05
7
Search large XML file -- REXML slower than a slug, regex instantaneous
Got a question hopefully someone can answer -
I am working on functionality to match on certain nodes of a largish (65mb)
xml file. I implemented this with REXML and was 2 minutes and counting
before I killed the process. After this, I just opened the console and
loaded the file into a string and did a regex search for my data -- the
result was almost instantaneous.
The question is, if I can get
2011 Apr 07
3
[Rails 3] No route matches error using RSpec even though route DOES match
I''ve recently run into a really weird situation that I''m just not sure
what''s going on here. I''m trying to write a route that will allow
searches to be done via GET requests (generally a good idea since it''s
just retrieving information, helps for links and SEO, etc.), and I
have the route properly set up and can access it in development mode
just fine,
2010 Sep 09
9
Will a Quad-core i5 processor significantly speed up development on Linux or Mac?
I am looking at getting a new Thinkpad with an i5 processor.
I was curious to what extent this would speed up developing a Ruby on
Rails
app. I am guessing that this depends to what extent multi-threading is
utilized,
but I am not sure---hence the question :^)
If it is not that significant, my other choice would be to get a used
Thinkpad
or Mac Pro, duo-core.
So is there a significant
2010 Jan 19
1
PGError: ERROR: operator does not exist: character = integer
Hi,
I''m using PostgreSql database with the rails application,In a
functionality I''m trying to compare two attributes in a condition, one
is of type varchar and other the Integer. While doing so i''m getting the
error as below.
ActiveRecord::StatementInvalid: PGError: ERROR: operator does not exist:
character = integer
LINE 5: WHERE PART.part_number =
2011 Jan 06
4
Not able to insert value in rails console
I am using authlogic for authentication in rails 3.0.3 with ruby 1.9.2
Using activerecord-sqlserver-adapter (3.0.5)
windows with sqlserver database
when i create user details in rails console, i am getting below error,
>User.create(:login=>''test'',:password=>''test123'',:password_confirmation=>''test123'')
2011 Mar 31
3
can i switch to rails 2.3.5 and run a rails 2.3.5 code??
Hi all,
i have installed rails 3 using RVM . the prob is now i have two parallel
projects where one is in 2.3.5 and another is in rails3.
i use Mac o x 10.6.3
mysql :Server version: 5.1.56 MySQL
so can i switch in between rails3 and rails 2.3.8??
this is my gem list...
actionmailer (3.0.5, 3.0.5.rc1, 3.0.4, 3.0.3, 2.3.8, 2.3.5)
actionpack (3.0.5, 3.0.5.rc1, 3.0.4, 3.0.3, 2.3.8, 2.3.5)
2011 Sep 18
9
Rails 3 and postgresql
I have a simple project created around a very, very simple database: one
main table packs with just three rows
Column | Type |
Modifiers
--------+-----------------------------+----------------------------------------------------
id | integer | not null default
nextval(''packs_id_seq''::regclass)
nombre | character