Displaying 18 results from an estimated 18 matches for "bristav".
Did you mean:
borislav
2006 Jan 09
3
Chopped files when downloading from database
I have some files stored in db. When I try to download these I only get
65535 bytes from the database even if the file is a lot bigger. Is it a
Rails setting I''ve missed or a database setting? Anything else?
Using Rails 1.0, WinXP and MySQL4.1
/Marcus
2006 May 24
10
Ferret slow after a while
I''m building a new index from scratch based on a number of documents
stored in a database loaded using my Rails env (using Ruby Ferret 0.9x
(installed today with Gem) on Windows). At first everything goes nice
but after a number of documents it starts to go slower and slower until
it grinds to a halt (at least feels like it).
Am I doing something wrong? Is there some way to work
2006 Mar 01
4
STI, subclasses and callbacks
I have a STI class tree. I want to set some default values (calculated
values so I can''t set it in the database as defaults) on every created
instance regardless of what subclass is actually instantiated. So I
figured adding a after_create callback in the top class in the hierarchy
should do the trick. It seems it doesn''t get called :(
Code:
class SuperClass <
2006 Jan 26
2
Render and publish to static files?
What would be the best way to publish a number of pages to static html
pages? Just loop through them and create URL:s and fetch them with http
or is there a better way?
tia
/Marcus
2006 Feb 12
6
Including another helper
I need to include another helper module apart from the normal two
(ApplicationHelper and [controllername]Helper). The inclusion needs to
be dynamic and based on external parameters (ie what helper that get
included differ from request to request).
Is it possible? How?
/Marcus
2006 Mar 16
1
Use Migrations in modules in separate source trees?
We have a scenario where we have a core engine with module add-ons. What
modules that will be used differ from deployment to deployment. Each of
these modules might need different things in the db (both structure and
data) and I want each module to be in charge of its own db structure.
Each module is contained in its own source directory and what modules to
use is determined in the build
2005 Nov 01
5
Strange error(s) on windows only
I have some strange behaviour on Windows XP boxes (the same code on
Linux doesn''t have the same behaviour). Ruby 1.8.2 and Rails 0.14.2.
I have a single inheritance table nodes with a base class Node
(acts_as_tree) and some subclasses such as PageNode and FolderNode. If I
render the tree in an iframe in a set of iframes it doesn''t work, if I
render it stand alone it works
2006 Jun 26
7
Using Rails to Generate static pages
Hi all,
Has anyone ever thought about or implemented a way to use Rails to pull
content from a database and actually *generate* static html pages from view
templates?
I want to throw a bunch of content into a db using rails and then put all
my website templates into the views dir and write the files out with the
content inside.
The funny thing is that the html pages Rails normally outputs to
2006 Mar 14
8
"Database" as a collection of XML docs
Hello everyone,
A new project I''m starting on has a "database" consisting of many 10s
of thousands of XML documents. They all conform to a common schema.
The project consists pretty much exclusively of searching and
presenting existing data - there''s no need (for the forseeable future)
to be able to input or update XML documents in the database. Unlike
(say) blog
2006 Jun 27
0
How to model Hibernate multi-table inheritance with ActiveRecord?
Hi
I have this "old" database mainly modeled for Hibernate. The java model
has something called Asset. Asset is inherited by SomeAsset and
AnotherAsset and the similar stuff is in the asset table and the
specific data for SomeAsset is in table some_asset and for AnotherAsset
in another_asset. This is then reflected in hibernate using a
<joined-subclass/> element.
What would
2006 Apr 01
1
UTF-8 in migrations: problem with broken chars in db
I need to put some data into the database using migrations. The data
needs to be in UTF-8 format (since the database and the rest of the
Rails application is UTF-8). It doesn''t work.
I have set up the UTF-8 support in environment.rb (which works perfectly
in the rest of the application). I have also tested to save the
migration file as a UTF-8 file (variable char length), as a
2006 Mar 04
0
Best way to perform lengthy operations?
What is the best way to handle lengthy operations with Rails (lengthy in
this case could be a minute or even more)? I want to give response to
the user about what is happening so I guess polling the server with ajax
is one way to get data to the browser.
But what do I do with the lengthy operation? I mean, the best as I see
it would be to make the first request (the one that triggers the
2006 Mar 07
0
production.log says status 200, browser says 500?
I have a long running operation (more than a minute) that is running in
a request. The operation completes according to the log and the log says
that it returns http status 200. Sometimes an error message is written
after the 200 log message (included at the end of this message). But the
browser get a status 500 from the Apache server. We''re using Apache with
SCGI on Windows doing
2006 Feb 08
0
Publish to static pages
I need to "publish" pages to static files (in order to transfer to a
server where Rails isn''t available, this is not for caching).
When I do:
require "open-uri"
def publish
File.open(publish_path, "w") do |file|
open(base_view_path) { |res| file.write(res.read) }
end
end
where publish() is a method on a model running in Rails
2006 Feb 12
3
Invoke render multiple times
I need to invoke render() multiple times. This is not to render a
response to the browser but to get the result of render() and put it in
files. Is there another way to do it if it''s not possible to do it
directly with render()?
Btw, what''s the reasoning behind only allowing render() to be called
once a request?
/Marcus
2006 Jan 10
1
Problem with belongs_to
I have a model where I have a tree of nodes in one table (acts_as_tree)
where I also use a type column to get inheritance. In this table I also
have a data_id column that refers to another row in another table (the
subclass knows what table).
I also have another class that have this line
class Page < ActiveRecord::Base
belongs_to :node,
:foreign_key =>
2006 May 24
1
How to compile on Windows?
I need the UTF-8 support and I guess I therefore need to compile the C
extension. I''m living on Windows right now and haven''t done any serious
compilation of C stuff ever in Windows.
What is recommended setup? I have tried Visual Studio C++ Express 2005
(I think) and added all header-files from the Platform SDK (the first
one was missing a number of header files). It starts
2006 May 24
3
Offline indexing with Drb, online using index in Rails?
I have a Rails application where I need to search. Every time an update
happens to something I need to update the index for the changed and
related document. As I currently have to run on Windows (and therefore
can''t use the native extension) it is quite slow to index sometimes and
the user have to wait a couple of seconds for the save operation to
return.
A thought is to put this