Displaying 20 results from an estimated 10000 matches similar to: "Render and publish to static files?"
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 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 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
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 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 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 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
2004 Dec 09
2
Samba and internet!
Hi everybody!
I have a problem wich has pusseled me for sometime time.
I have put samba on an internal subnet wich is the same as the
windowsclients. Everything works great as long as internet is up and
running but if internet goes down then the windowsclients can't find the
sambaserver or just simly times out when trying to log in.
On one installation I have a netgear router wich handels
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 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 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 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 May 31
7
How to render from with <%%> ?
I have a loop that I iterate through in my view.
<%
coll.each do |itm|
puts(itm.value)
end
%>
How do I render the itm.value without using a <%= %> tag? Should puts
not work?
Joerg
P.S. There is a good enough reason for me wanting to do this :-)
--
Posted via http://www.ruby-forum.com/.
2006 Aug 03
3
Swedish Rails
I would like to announce my plugin Swedish Rails.
Rails provide many goodies and helpers for you, but some of these are
dependant on your user interface being in english. Date controls, for
example. Pluralization is another. And have you ever tried to capitalize
a string with Swedish letters in them? Then you know it doesn''t work
that well. Until now, that is. You install this
2006 Jan 21
4
Migrations and Time datatype. Bug?
I''ve defined a table with these columns
t.column "some_date", :date, :null => false
t.column "some_time", :time, :null => false
The result in schema.rb is
t.column "some_date", :date, :null => false
t.column "some_time", :time, :default => Sat Jan 01 00:00:00 GMT
Standard Time 2000, :null => false
The time column generates a
2023 Feb 21
2
Gluster 11.0 upgrade
Hi Xavi,
Copy the same info file worked well and the gluster 11 arbiter
is now up and running and all the nodes are communication
the way they should.
Just another note on something I discovered on my virt machines.
All the three nodes has been upgarded to 11.0 and are working.
If I run:
gluster volume get all cluster.op-version
I get:
Option Value
------
2017 Oct 27
2
Draft review request (php7 on CentOS) [Was: Documentation proposal]
?A wiki article about how to use php7.x on CentOS 7 has been written
by ?Thibaut
Perrin. His draft can be found in the Scratch section of:
https://wiki.centos.org/ThibautPerrin
?Feedback welcome.
Akemi?
On Wed, Oct 25, 2017 at 2:20 PM, Thibaut Perrin <thibaut.perrin at gmail.com>
wrote:
> Hi,
>
> No problem, everyone has a life, I understand that ;)
>
> I've put the
2017 Nov 03
2
Draft review request (php7 on CentOS) [Was: Documentation proposal]
Hi all,
How long should we wait to decide if we should publish it elsewhere ?
Thanks,
Thibaut
On 27 October 2017 at 16:05, [-=X.L.O.R.D=-] <xlord.sl at gmail.com> wrote:
> Akemi,
>
> Thank for info, seems many developer are using ?centos-release-scl? these
> days, that makes life easier, however, it is little to governance the
> ?software source collection? if they are
2007 Aug 05
1
rsync always gets index.html
I use to sync several servers with rsync for years now. One strange thing I
still havent figured out:
while rsync does its job perfectly will, it cant refuse to transfer all files
with "index.html" in it, even if the files havent change.
example:
the following files are the same for years, but every night rsync copies them again: