Re: [Rails] Handling Hot Data with ActiveRecord

2015-07-23 Thread Mohit Sindhwani

Hi Scott,

On 23/7/2015 8:12 PM, Scott Ribe wrote:

Because it was the count(distinct x) that was the problem :)
Doing only a count(*) is faster without the subquery... and is what we have 
switched to.

So does the limit reduce it to less than 1 day's rows?


Yes, the idea of the limit (900k records) was to limit it to the records 
within 1 day and then run the query on the smaller record set.  However, 
after your comments, when I was looking around, I resolved that the 
slowness is because of the count (distinct x) and not because of the 
indexes, etc.


For reference, on a 230million record table, the numbers were roughly 
along these lines:
* SELECT count(*), count (distinct group_id) with a limit of 900k 
records based on ID DESC, followed by the recorded_on part = 8.6 seconds
* SELECT count(*), count (distinct group_id) on the whole table using 
only recorded_on in the WHERE = 14 seconds
* SELECT count(*) only with a limit of 900k records based on ID DESC, 
followed by the recorded_on part = 700ms
* SELECT count(*) on the whole table using only recorded_on in the WHERE 
= 350ms
--> Clearly, the culprit was the count (distinct group_id) - that 
benefits a lot by using a subquery to limit the number of records it 
considers
* SELECT count(*) from (select distinct group_id from data_store_v2 
where recorded_on >= '') --> takes around 900ms


So, we are combining these in the final query now... this takes around 
900ms to get both values (count and count distinct)

-- get the fields from 2 different subqueries
select * from
-- first field is got for the count(*)
(select count(*) AS all_count from data_store_v2 where recorded_on >= 
(now() AT TIME ZONE 'Asia/Singapore' - '24 hr'::INTERVAL)) as t1,

-- and Joining in the second one for the count (distinct group_id)
(select count(*) from
-- this is yet another subquery
(select distinct drive_id from data_store_v2 where recorded_on >= 
(now() AT TIME ZONE 'Asia/Singapore' - '24 hr'::INTERVAL)) td ) as t2;



But as I mentioned, this is now a PostrgreSQL question not an 
ActiveRecord or Rails question :)


Thanks for digging with me!

Best Regards,
Mohit.






--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/55B0E89C.8090501%40onghu.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Handling Hot Data with ActiveRecord

2015-07-22 Thread Mohit Sindhwani

Hi Scott,

On 23/7/2015 11:54 AM, Scott Ribe wrote:

On Jul 22, 2015, at 9:10 PM, Mohit Sindhwani  wrote:

We have tried this and the query is quite a bit slower.  Filtering to the last 
900k records before doing the recorded_on part helped speed it up.

I don't understand how that could possibly be the case if there's an index on 
recorded_on.


Because it was the count(distinct x) that was the problem :)
Doing only a count(*) is faster without the subquery... and is what we 
have switched to.





Your email got me going back to look at all the parts again since obviously the 
query should be using the index and it was still slow.  Further search last 
night made me realize that it's not the indexes that are a problem.  The 
problem is the count(distinct group_id) part which seems to be quite slow in 
PostgreSQL.  This is a lot faster:
select count(*) from
(select distinct group_id from
data_store_v2 where recorded_on >= '2015-06-06') td;
than:
select count(distinct group_id) from
data_store_v2 where recorded_on >= '2015-06-06';

as explained here: 
https://www.periscope.io/blog/use-subqueries-to-count-distinct-50x-faster.html

So, I guess the real problem was being masked by something else and an 
incorrect assumption on my part :)

I would expect the select count(distinct...) to be a major contributor to the 
time taken by the query, just given the amount of work it must do. The select 
count(*) from (select distinct...) alternative is a nice tip :)


...and that is what the cause was.


Thanks for the analysis :D
I do understand SQL and I thought I'm not throwing things together... for my 
understanding, which column was unnecessary?  I thought we needed all:

group_id for counting the distinct group_id
recorded_on for the subsequent query on it
id only for getting the most recent records

I apologize--I misread the query structure. I got it into my head as:

select ... from (select ... from ... where recorded_on ... order by ... limit 
...)

I think you can see how THAT query would have better fit my description of 
being poorly constructed.

I'm glad that my somewhat off-base pontification still managed to point you in 
a useful direction!



Yes, thanks again.

Best Regards,
Mohit.


--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/55B07B49.5050807%40onghu.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Handling Hot Data with ActiveRecord

2015-07-22 Thread Mohit Sindhwani

Hi Scott,

Thanks for your email.  Your inputs are certainly useful.

On 22/7/2015 9:54 PM, Scott Ribe wrote:

On Jul 21, 2015, at 8:30 AM, Mohit Sindhwani  wrote:

select count(*), count(distinct group_id) from
(select group_id, recorded_on from data_store_v2 order by id DESC limit 90) 
td
where recorded_on >= (now()  - '24 hr'::INTERVAL);

Some suggestions in a slightly different direction:

1) rewrite without that completely unnecessary subquery, and see if the query 
time improves ;-)


We have tried this and the query is quite a bit slower.  Filtering to 
the last 900k records before doing the recorded_on part helped speed it up.



2) check that appropriate indexes exist and are being used by the optimizer

3) really analyze the query execution plan, and look for more advanced 
opportunities, for instance, order by recorded_on instead of id, since, presumably, 
the query will already access the rows by an index on ordered_on; consider dropping 
the limit & order altogether; take that query to a PostgreSQL list...


Your email got me going back to look at all the parts again since 
obviously the query should be using the index and it was still slow.  
Further search last night made me realize that it's not the indexes that 
are a problem.  The problem is the count(distinct group_id) part which 
seems to be quite slow in PostgreSQL.  This is a lot faster:

select count(*) from
(select distinct group_id from
data_store_v2 where recorded_on >= '2015-06-06') td;
than:
select count(distinct group_id) from
data_store_v2 where recorded_on >= '2015-06-06';

as explained here: 
https://www.periscope.io/blog/use-subqueries-to-count-distinct-50x-faster.html


So, I guess the real problem was being masked by something else and an 
incorrect assumption on my part :)



4) put some effort into learning SQL better; OK, we all make mistakes sometimes 
and maybe this is just that; but it sure looks to me like someone who doesn't 
really understand SQL struggling at throwing together various clauses until the 
correct answer pops out (note that in addition to the issue I pointed out in 1, 
the subquery is selecting a column which is completely unused--probably doesn't 
affect anything, but just another sign that the person writing the query did 
not understand it).


Thanks for the analysis :D
I do understand SQL and I thought I'm not throwing things together... 
for my understanding, which column was unnecessary?  I thought we needed 
all:

> group_id for counting the distinct group_id
> recorded_on for the subsequent query on it
> id only for getting the most recent records

Most of my personal work is with SQLite3 on embedded platforms, but this 
discussion resolves the problem for now.  It now moves away from being a 
Rails issue to being a PostgreSQL issue.


Best Regards,
Mohit.

--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/55B05B1B.9010904%40onghu.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Re: Handling Hot Data with ActiveRecord

2015-07-22 Thread Mohit Sindhwani

Hi Elizabeth,

Thank you for replying.

On 22/7/2015 3:33 AM, Elizabeth McGurty wrote:
First I would work to learn patterns in time increments, which occur 
most often, and plan from there.


We do know that - we have a few peak hours when more data comes in, and 
then there are hours (like night time) where the data drops to a trickle 
for some of the records.  However, there are some status emails, etc. 
that come at a fixed frequency - few times an hour, irrespective of the 
hour.


Then I would design with regard to DB code and servers, optimal 
Master-slave replication.  Pretty sure that in replication WHERE  
clauses like (where recorded_on >= (now()  - '24 hr'::INTERVAL) could 
be eliminated at the user level. But I am not certain.


While this is something that might help, I'm more looking at solutions 
that involve having hot data tables in the manner:

 > All the data
 > Data for the last 24 hours
 > Data for the last 2 hours
That way, when we want something recent, we would just query the most 
recent table, but in the few occasions that we need something more, we 
go to the larger tables that are sharded.


Best Regards,
Mohit.


--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/55AF9897.3000403%40onghu.com.
For more options, visit https://groups.google.com/d/optout.


[Rails] Handling Hot Data with ActiveRecord

2015-07-21 Thread Mohit Sindhwani

Hello!

We are thinking of different ways to handle hot data in our system.  We 
get a lot of information that's very relevant for periods of time.  So, 
for example, we have some data that we query on the basis of

> counts over last 30 minutes
> data collected in the last 30 minutes
> items collected today
> items collected within the past week
...and so on.

We are looking at different strategies to keep this data updated and to 
manage scaling the database.  So, we are looking at horizontal sharding 
[splitting data into multiple tables that inherit from a master and have 
exclusion constraints] and are also considering having tables that hold 
data as:

> All the data
> Data for the last 24 hours
> Data for the last 2 hours
That way, when we want something recent, we would just query the most 
recent table, but in the few occasions that we need something more, we 
go to the larger tables that are sharded.


Just for reference, we are doing something like this:
select count(*), count(distinct group_id) from
(select group_id, recorded_on from data_store_v2 order by id DESC limit 
90) td

where recorded_on >= (now()  - '24 hr'::INTERVAL);

We are getting 800,000 data items a day right now and the above query 
takes around 14 seconds on a single table that is not sharded and has 
around 268million records.  Every week, this table becomes slightly 
slower since we add close to 6 million records every week.


I've read this: 
https://www.amberbit.com/blog/2014/2/4/postgresql-awesomeness-for-rails-developers/ 
and am looking at ways that everything is managed under Rails, if possible.


So, the questions (and thanks for reading this far) are:
> What is a good way to do this while still working within ActiveRecord?
> This is a capability that we'd like to attach to any model that might 
need it.  What would be a good way to approach a gem for it?


I'm sure there will be a few more questions as we progress on this.

Thanks,
Mohit.


--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/55AE5789.60905%40onghu.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Rails] Which Company is Best on Ruby on Rails Development in India?

2014-01-31 Thread Mohit Sindhwani

On 22/1/2014 5:35 PM, Adam Gilchrist wrote:
Hi all, I looking for best company on Ruby on Rails Development in 
India. Have any good companies in India please let me know.




Josh Software - they are great and very good contributors too.
http://www.joshsoftware.com/


Best Regards,
Mohit.

--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/52EBB8B2.1070706%40onghu.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Rails] Rails ActiveResource URLs for searches including habtm relationships

2013-05-09 Thread Mohit Sindhwani

Thanks Colin.

On 10/5/2013 4:43 AM, Colin Law wrote:


I think you will have to look at the Redmine docs, unless someone here
knows the answer.

Colin


I'm reading the source now to see if I can find what I need.  Thanks for 
helping.


Best Regards,
Mohit.
10/5/2013 | 11:22 AM.

--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Rails ActiveResource URLs for searches including habtm relationships

2013-05-09 Thread Mohit Sindhwani

Hi Colin,

Thanks for trying to help.  Answer further down.

On 9/5/2013 8:31 PM, Colin Law wrote:

On 9 May 2013 10:08, Mohit Sindhwani  wrote:

Hi!  I'm trying to build a small client that connects to Redmine to get the
list of users attached to a project.

Following the AR/ Rails conventions, I can get back all projects as:

http://redmine/projects.xml
http://redmine/users.xml


It is not clear to me what your question is.  Can you give a specific
example (including the relationships between models) of exactly what
you are trying to do?

Colin



I'm actually writing a C++ client that accesses information using HTTP 
from a Rails ActiveResource application (Redmine).  I can use URLs like 
"http://redmine/projects.xml"; and "http://redmine/users.xml"; to get full 
lists of projects and users. The relationship between these 2 resources 
is a HABTM.  I'm trying to figure out if there is a default URL (i.e., 
Rails convention) at which I could GET the relationships so that I can 
figure out which users belong to which projects... or figure out which 
users belong to a specific project.  Since I'm doing this from C++ and 
not from a Ruby client, I am trying to figure out the URL, method and 
parameters that I need to provide to get this information.


Hope it's clearer now?

Given how much trouble I'm having explaining this, maybe, I should stop 
searching and start reading the source for Redmine..


Best Regards,
Mohit.

--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Rails] Rails ActiveResource URLs for searches including habtm relationships

2013-05-09 Thread Mohit Sindhwani
Hi!  I'm trying to build a small client that connects to Redmine to get 
the list of users attached to a project.


Following the AR/ Rails conventions, I can get back all projects as:
> http://redmine/projects.xml
> http://redmine/users.xml

and do searches such as:
http://redmine/issues.xml?limit=10&project_id=3

This works when it involves an attribute or belongs_to criteria.

Can someone help me understand the URL that should be used when trying 
to search on a HABTM criteria?


For example, I want to know all the users on a project.  But that 
relationship is achieved through a HABTM table.  Is there some default 
Rails routing that covers this scenario?


I tried searching online but I'm just not being able to formulate a 
query that returns useful results.


Thanks & Best Regards,
Mohit.


--
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Rails] Open Source Project Suggestion

2012-06-13 Thread Mohit Sindhwani

On 13/6/2012 8:01 PM, Sam Serpoosh wrote:

Hello everyone,

I'm looking for a rails open source project which is using newer 
versions of rails and is a good place for reading other people's code 
for learning
more and more ways and techniques of developing rails projects, etc. 
and maybe they accept participation too.




How about Redmine?
www.redmine.org

Best Regards,
Mohit.
13/6/2012 | 8:29 PM.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Mongrels don't restart on Reboot

2010-11-06 Thread Mohit Sindhwani

Hi All,

I'm trying what seems like a textbook deployment of Rails on an Ubuntu 
Server.

* I have a mongrel_cluster with 5 Mongrels behind an Apache server

I have been trying to follow the guides on how to get this to start up 
on reboot and just can't seem to get it done!  The guides make it seem 
easy, but I can't get it to work - so, I'm doing something wrong and 
can't find what it is.


Here's the setup:
* I'm using the Bitnami Ruby/ Rails Stack on AWS
* The root user on login is bitnami and is without password
* The login is using a pair of keys and putty
* I created a new deployment user called xmongrel with a group xmongrel
* I used mongrel_rails cluster::configure with the full path to the app 
and N=5

* Ruby is in /opt/bitnami/ruby
* The app is a Radiant site in /opt/bitnami/projects/rails_s04
* As the user bitnami, doing this does not start the mongrel_rails:
> mongrel_rails cluster::start
* After I do 'su xmongrel' and log in with the password, it works:
> mongrel_rails cluster::start
* I have mongrel_cluster copied to /etc/init.d
* I have also done:
> sudo /usr/sbin/update-rc.d -f mongrel_cluster defaults
(It gave me a warning about missing LSB info - though the script 
looked ok!)


I have been at this for quite a few hours now, and I'm still not getting 
anywhere.


What can I do to debug/ fix the problem?  Any help will be appreciated.

Best Regards,
Mohit.
7/11/2010 | 12:52 AM.

--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Is Ruby on Rails for beginner programmers?

2010-10-23 Thread Mohit Sindhwani

On 23/10/2010 8:56 PM, tonypm wrote:

Etilyeti
I think this thread got a bit hijacked on some slightly esoteric
issues.  Hopefully this didn't put you off.

I would say Ruby is a great place to start.  There is loads of really
good stuff on the web that will lead you into good programming
*snip*
hope this encourages you
Tonypm


I completely agree with Tonypm.  I would have liked to type out a clear 
well-written post like that myself.


I myself started with Rails (before Ruby) and it took me a while to 
realize the beauty of Ruby.


Best Regards,
Mohit.
23/10/2010 | 10:21 PM.

--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Mongrel failures but nothing in logs

2010-09-24 Thread Mohit Sindhwani

 Hi All,

We are having a few strange problems in production.

The Rails 2.3/ Ruby 1.8.6 application is hosted using Apache/ mod_proxy/ 
mongrel_cluster (managed by monit) running on CentOS.  This connects to 
a PostgreSQL instance running on a Windows  2003 server (it's behind a 
load balancer but the PostgreSQL port is redirected to one machine.


Suddenly, without reason or upgrade, the Rails app is returning 500 and 
nothing is in the Rails log - not in the mongrel logs, not in the 
production log.  We seem to be able to safely connect to a static image 
file - so, it should not be the Apache, we think.


We checked a few things:
* mongrel has the rights to folders like tmp and log
* the disk can be written to

Since nothing is in the logs, we are baffled - what could we check?

Thanks,
Mohit.

--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Performing Faster...

2010-09-02 Thread Mohit Sindhwani

 On 1/9/2010 7:00 PM, Adi wrote:
I would say don't over optimize prematurely. Seems you have done the 
basics, if the site does not seem slow why spend time or trying to 
solve a problem that does not exist yet.


As a side note you should keep an eye on 
http://railslab.newrelic.com/. They have made some good resources to 
scale rails apps.


Also nginx infront of apache is quite useful for serving up static 
files. nginx is lot better at serving static files. nginx will also 
eventually help you out in load balancing across web servers and help 
you avoid more complex solutions for sometime.




Thanks, Adi.  We are just in that phase where we have a bit of time to 
look at the final set of optimizations before we do the final sizing of 
the hardware for the projected load.  Thanks for the links - we will 
start to look at these now...


Cheers,
Mohit.
2/9/2010 | 5:25 PM.


--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Performing Faster...

2010-09-02 Thread Mohit Sindhwani

 On 1/9/2010 5:18 PM, Dermot Brennan wrote:

Yeah, this isn't really a rails question.

However, you should look at using something like Varnish 
http://varnish-cache.org/
to serve the static files.


Thanks - Varnish had not yet crossed my mind :)

Cheers,
Mohit.
2/9/2010 | 5:23 PM.

--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Performing Faster...

2010-09-02 Thread Mohit Sindhwani

 On 1/9/2010 4:29 PM, Joe Developer wrote:
I can't help myself from asking, why did you choose rails for this in 
the first place?
There's nothing wrong with Rails for the task of building a maps based 
application.. instead of Google Maps or Bing Maps, we use our own based 
on data that we have.  We use OpenLayers for the client side 
(Javascript) and store data in a database...


Specifically, which aspect of this would you think does not map to Rails?

Cheers,
Mohit.
2/9/2010 | 5:21 PM.

--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Performing Faster...

2010-09-01 Thread Mohit Sindhwani

 Hi All,

We are building a maps based site in which we serve out map tiles 
created by us.  The entire application is working well enough and we 
have followed through on most of the best Rails practices to speed up 
things.  We have also now gone through the list of YSlow and typical 
HTTP practices to further reduce the time spent in the application.


I guess it's now time to go beyond the design and look at what can be 
done with the servers.  We are using a traditional Apache + Mongrel 
Cluster for deployment at this time.


I have been reading and Thin looks attractive, as do Nginx and 
Lighttpd.  I am wondering what we should look at next.


Serving map data requires us to server a number of tiles (256 x 256 
pixels each) to create the map the user sees.  Naturally, we will add 
"expires" headers, etc. so that the client caches it (if it can).  We 
are just wondering if there is a recommended way to reduce the time it 
takes to serve files.


The tiles are served from a complex directory structure on four assets 
domains.  Is there a "very fast static file server" that you would 
recommend us to use?  Any experience or guidance would be great..


Thanks,
Mohit.
1/9/2010 | 3:59 PM.

--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: how to perform "most viewed"

2010-08-19 Thread Mohit Sindhwani

 On 20/8/2010 3:50 AM, Robert Walker wrote:

nirosh wrote:

i have a poem model. i need to display the most viewed poems.
is there any plug inns out there to do this?

Unless I'm missing something obvious, I wouldn't think a plugin would be
needed for this.

poems_controller.rb

def show
   @poem = Poem.find(params[:id])
   @poem.increment!(:view_count)
   ...
   ...
end


...or use update_counters
http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001792

Cheers,
Mohit.
20/8/2010 | 4:00 AM.


--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Ruby on rails and android

2010-07-08 Thread Mohit Sindhwani

On 8/7/2010 1:06 PM, shyam mohan wrote:

Hi alll...
 simmiler question i also want to ask 
 How to use Rails for android application development...?
Is there any tool for that...like iphone application development?


rhomobile.

Best Regards,
Mohit.
8/7/2010 | 11:41 PM.

--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Re: Rails vs Grails

2010-05-20 Thread Mohit Sindhwani

On 20/5/2010 8:26 PM, Peter Hickman wrote:


Not saying that there aren't technical reasons to reject Grails but on 
purely business grounds Rails is king.


How long has the Rails community waited to hear the second half of that 
statement!


Best Regards,
Mohit.
20/5/2010 | 8:54 PM.

--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



Re: [Rails] Double render/redirect philosophy

2010-02-08 Thread Mohit Sindhwani

On 9/2/2010 3:04 AM, Ralph Shnelvar wrote:

Ok, I think I understand why RoR will flag an attempt double render in
an action.

What I don't understand is the philosophy of render and redirect_to.

Specifically, why isn't a return implicit in both those methods?

Or, I guess, more to the point ... what are the advantages of writing
code in the action after a render/redirect_to?
   


I'm not sure how Rails works, but in a C++ HTTP server that we did, we 
could do something like write the response to the browser and then do 
the remaining house-keeping tasks.  For example, it would be perfectly 
fine to update the logs, perform some other calculation, etc. that does 
not affect the output (since it's been sent off already) but is 
something that the system could use.


In another system, we did something like receive a request by HTTP POST, 
check the parameters and acknowledge the receipt of the request to the 
client as the response.  Thereafter, we needed to process the request 
(which took quite a while) and then we would POST the results to a URL 
on the client's side.


I think both these cases would be things that don't need to be put into 
an after_filter and would benefit from writing code in the action after 
a render (assuming Rails works/ allows one to work this way).


Cheers,
Mohit.
9/2/2010 | 3:26 AM.

--
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.



[Rails] Re: Something like a file server

2009-10-18 Thread Mohit Sindhwani

Jacob Helwig wrote:
> It should also be possible to have whatever is delegating to Mongrel
> directly serve up files that exist on disk already.  Then you could
> save things from the DB to disk, and not tie up a Mongrel worker after
> the first hit.  This makes your "always download the most recent
> version" trickier, though.
>   

Thanks Jacob.  I think you've given me a couple of pointers on how to 
proceed from here.  I guess the above idea can be implemented using 
Rails caching also.

Cheers,
Mohit.
10/18/2009 | 5:29 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Something like a file server

2009-10-18 Thread Mohit Sindhwani

Hi Jacob,

Thanks for the quick reply.

Jacob Helwig wrote:
> A common approach used for something like this is to have a "current"
> symlink, and update it, whenever you have a newer file.
>
> Eg:
> $ touch some-file-v1
> $ ln -s some-file-v1 current-version
> $ touch some-file-v2
> $ ln -sf some-file-v2 current-version
>
> If you give people the URL to "current-version", and only update the
> symlink after you've created the new version, then they won't be
> downloading a file before it's completely written out to disk.
>   

This seems simple enough!  Would this approach also work if someone was 
already accessing the older file when we try to do the second set of steps:

$ touch some-file-v2
$ ln -sf some-file-v2 current-version


Can I update a symlink while someone is already reading a file?


> We use the "store the files in the DB" approach for a few of our
> projects at $work, and that works pretty well for us.  It's not really
> a waste, especially if you plan on having multiple "physical"
> webservers.
Actually, I do use this for one of our solutions.  The only concern is 
that you need many more Mongrels if your files are very large - since 
sending the file from database locks up the Mongrel for a longer period 
of time... with small files, it works quite well.

Cheers,
Mohit.
10/18/2009 | 4:42 PM.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Something like a file server

2009-10-18 Thread Mohit Sindhwani

Hi, I'm sorry if this is slightly OT, but I'm trying to find a way to do 
the following.  I have a bunch of processes that generate regular update 
files.  Each file may be between 100KB - 4MB in size.

On the other side, I have people who want to pick up the most recent 
version of this file.  So, I need to give them a fixed URL to the file.  
When they make a request, they would like to get only the most recent 
file.  Initially, I thought that something like FTP would work, but I 
run into the problem that if a request comes in when the file is being 
updated, the client may not get a valid file.

The other extreme is to have an upload controller and a download 
controller and then store the file in a database, so that it can be 
served up through the database.  The database serializes it so that I 
don't have to worry.  But, since the files can be large, it seems a bit 
of a waste to use this approach.

Is there a better way?  Anything that you would recommend?

Thanks,
Mohit.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: PHP app on the same server as Rails app

2009-09-28 Thread Mohit Sindhwani

Greg Lazarev wrote:
> Hi,
>
> I am trying to figure out how to best serve a PHP app on the same server
> as my Rails app. Basically, the PHP app is a 3rd party blog that I want
> to be able to access on the same server. The server is powered by
> mongrel cluster and apache. I tried putting the blog in /public but then
> /blog/login does not work, while /blog/login.php does. Anyway what is
> the best way to solve this?
>   

I personally just use a different sub-domain.

Cheers,
Mohit.
9/29/2009 | 9:02 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: preceding zero

2009-09-27 Thread Mohit Sindhwani

Craig White wrote:
> On Mon, 2009-09-28 at 01:52 +0800, Mohit Sindhwani wrote:
>   
>> Craig White wrote:
>> 
>>>> 
>>>> 
>>> 
>>> you can easily create your own function and put it into application.rb
>>> or the helper
>>>
>>> myvar < 10 ? "0" + myvar.to_s : myvar.to_s
>>>
>>> it must be a string to retain the leading zero
>>>   
>> or "%02d" % myvar
>> 
> 
> ok - you win
>
> Craig
>   

Hardly :)  I just use that a lot!!  A lot of  my work involves data 
conversion and when outputting it, sending out 7 or 10 decimal places 
looks clumsy.  So, it's short hand that I've become accustomed to writing :)

Cheers,
Mohit.
9/28/2009 | 11:48 AM.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: preceding zero

2009-09-27 Thread Mohit Sindhwani

Craig White wrote:
> On Sun, 2009-09-27 at 19:26 +0200, Michael .. wrote:
>   
>> hi.
>>
>> I want to format a Integer value to a hour with a preceding zero.(two
>> digits)
>> eg. 8 => 08
>>
>> Exists a Ruby or Rails function for that?
>>
>> 
> 
> you can easily create your own function and put it into application.rb
> or the helper
>
> myvar < 10 ? "0" + myvar.to_s : myvar.to_s
>
> it must be a string to retain the leading zero

or "%02d" % myvar

Cheers,
Mohit.
9/28/2009 | 1:52 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: for crontab

2009-09-21 Thread Mohit Sindhwani

Preksha Patel wrote:
> Hassan Schroeder wrote:
>   
>> On Sun, Sep 20, 2009 at 11:27 PM, Preksha Patel
>>  wrote:
>>
>> 
>>> i haven't read man pages for cron or crontab...can you please help me
>>> for that??i mean from where i can read it?? can you please give me
>>> link??
>>>   
>> 
>>
>> HTH,
>> --
>> Hassan Schroeder  hassan.schroe...@gmail.com
>> twitter: @hassan
>> 
>
> hi,
>
> why you have given me this link??it is about man command for UNIX..
>   
I imagine that he's passed you that link so that you can learn how to 
use man and then read the documentation for cron/ crontab.

Cheers,
Mohit.
9/22/2009 | 12:51 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: rails CMS - which is most stable & simplest at the moment? (i.e. has a solid following)

2009-09-20 Thread Mohit Sindhwani

Greg Hauptmann wrote:
> Hi - there quite a few Ruby on Rails CMS's out there.  Can anyone give
> a picture of which are the most supported/worked on at the moment
> (i.e. most likely to have a long life)?   Just after a simple CMS...
>   
radiant - www.radiantcms.org

Cheers,
Mohit.
9/21/2009 | 1:25 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Geographical Services?

2009-08-23 Thread Mohit Sindhwani

Peter Laurens wrote:
> This is a broad question to get me started in the right direction:
>
> I would like to provide a location-based service so that users can tag
> articles with a location (the place where the article took place), and
> search (or list) articles by location.
>
> This raises some questions:
>
> - Presumably best practice is to allow the user not to type free-form
> locations, but to help them pick a location from a list?
>
> - Are there any frameworks that handle geographical hierarchies? For
> example, an article may be tagged with a city name, and a user may want
> to list all articles for a county, we'd need to know all of the cities
> in each county or we'd return nothing.
>
> The simplest thing may be to just have a flat list of places, with no
> hierarchy, a list of cities and major towns for example?
>
> Any broad advice on what's out there to provide any
> geographical/location services would be much appreciated!
>   

I'm not going to be able to help this yet, but just to add to it.  What 
level of granularity do you want to provide?  Can people search by the 
places within a city?  How about different shops/ outlets within a 
city?  Does it matter which branch generated the document?

Cheers,
Mohit.
8/23/2009 | 8:08 PM.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: CMS in Rails

2009-07-18 Thread Mohit Sindhwani

Prathiba Danthanarayana wrote:
> i have got to do a R&D for CMS in rails. so can someone tell me what is
> the best for CMS in rails ?
>   
What do you mean R&D?
What are the features you are looking for?

Radiant CMS is pretty good.

Cheers,
Mohit.
7/18/2009 | 8:22 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Choosing RoR or CMS for a customer which wants to customize

2009-06-26 Thread Mohit Sindhwani

Roderick van Domburg wrote:
> +1 for Radiant CMS. It's super easy to extend and there's a lot of 
> existing extensions too. WYSIWYG / WYSIWYM is one of them.
>   
+1
(and a great community!)

Cheers,
Mohit.
6/26/2009 | 7:09 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Word document parsing using ROR

2009-06-22 Thread Mohit Sindhwani

p_W wrote:
> @Mohit:
> It was asked previously by the OP, he just never got his question
> answered properly.
>   
My apologies in that case.  Sorry to all.  Just that with the volume of 
emails on Rails Talk and the increased number of questions like "I want 
to do this - send me code and everything else" (which I see as an 
indication that Ruby is gaining mass adoption), I probably missed the 
message.

Again, sorry.

Cheers,
Mohit.
6/23/2009 | 1:22 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: sqlite3....Ugghhh`

2009-06-22 Thread Mohit Sindhwani

Derek Smith wrote:
> The solution was on SLED 11.  Thank you for pointing me in the right 
> direction!
>   

Glad to.

Cheers,
Mohit.
6/22/2009 | 11:25 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: sqlite3....Ugghhh`

2009-06-18 Thread Mohit Sindhwani

Derek Smith wrote:
> Hi all,
>
> I have been reading and trying all the google links/forums for 2 nights
> now on how to fix my issue with getting sqlite3 installed so I can use
> rails.  Im running SLED 11.  plese help!  thank you!
>
> $ uname -a
> Linux linux-7lbv 2.6.27.19-5-pae #1 SMP 2009-02-28 04:40:21 +0100 i686
> i686 i386 GNU/Linux
>
> $ gem install sqlite3-ruby
> Building native extensions.  This could take a while...
> ERROR:  Error installing sqlite3-ruby:
>   ERROR: Failed to build gem native extension.
>
> /usr/bin/ruby extconf.rb
> checking for fdatasync() in -lrt... yes
> checking for sqlite3.h... no
>   
You need to install the development set for SQLite3 since the gem has a 
native build.  From:
http://theplana.wordpress.com/2007/05/11/install-sqlite3-on-ubuntu/

you need to do the equivalent of the below step:

* Install Sqlite3
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby

I'm sorry I'm a limited Linux user (and mostly use Ubuntu there).

Cheers
Mohit.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Urgent ! Need Web Services Help

2009-06-17 Thread Mohit Sindhwani

Hamid Raza wrote:
> I want to develop web services using ruby on rails , how can i , any
> help ?
>   
How is this urgent?  Have you even searched the Internet for web 
services on Rails?

Cheers,
Mohit.
6/17/2009 | 6:32 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Word document parsing using ROR

2009-06-12 Thread Mohit Sindhwani

anandh wrote:
>  Is there anyway to parse word document to upload the data from
> word doc to d/b pls help me in sorting this issue.
>   

This has been asked and answered recently.

Cheers,
Mohit.
6/12/2009 | 7:06 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails Code Indentation

2009-06-06 Thread Mohit Sindhwani

JannaB wrote:
> What do you use asa good RoR editor then?
>   
NetBeans indents very well.

Cheers,
Mohit.
6/7/2009 | 11:03 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: CMS and REST - best practices

2009-05-11 Thread Mohit Sindhwani

Mauricio Dulce wrote:
> hello, i need add the comments to radiant please i neet a tutorial
>   

It would be good to ask on the Radiant CMS mailing list, but see:
* http://github.com/saturnflyer/radiant-comments/tree/master
* http://wiki.github.com/radiant/radiant/using-radiant-as-a-blog

Cheers,
Mohit.
5/12/2009 | 9:30 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: CMS and REST - best practices

2009-05-11 Thread Mohit Sindhwani

wejrow...@gmail.com wrote:
> OK I need a bit of direction for this. I want to build an app where I
> have a CMS side that edits everything (which is all private), then a
> public side which just views is all. My dilemma is how to set this up.
> What is the best practice for this?
>
> I have a couple ideas:
>
> obj1Controller/Obj1 (this would publicly list every obj1)
>
> obj1Controller/Obj1/edit (this would privately list every obj1 and
> allow you to edit)
>
>
> OR do I do something where there's a whole other side:
>
> CMS/obj1Controller/  (private)
> PUBLIC/obj1Controller/ (public)
>   
Would you want to consider using a ready solution: Radiant CMS?
URL - http://radiantcms.org/

Cheers,
Mohit.
5/12/2009 | 9:16 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Content Management the Rails way

2009-03-28 Thread Mohit Sindhwani

Neil Middleton wrote:
> Hi guys, 
>
> I'm currently looking into the CMS's we use at the moment in house 
> with an aim to replace them with a Rails / Ruby based system to match 
> our application stacks (we do 50/50 app / CMS development).  At the 
> moment we're using Joomla and a CMS written in ColdFusion.
>
> Question is, I've looked at Radiant, Comatose etc and these all seem 
> very very simplistic. Is anyone aware of anything out there similar to 
> systems such as Joomla? Is there anything out there that doesn't treat 
> a content item solely as a page but as something that can be rendered 
> in lots of different places at once?
Not sure what you mean by the last part, but Radiant has snippets that 
can be rendered in lots of different places.  If you could clarify a bit 
more about what you mean, I could help you see if Radiant is similar to 
what you need.

Cheers,
Mohit.
3/29/2009 | 12:44 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Making a backend-centric application

2009-03-10 Thread Mohit Sindhwani

Christian Wattengård wrote:
> Is Rails usable for a backend/server-centric application? The
> application is supposed to just sit there and grab data from various
> sources at certain times, process them, stuff them in a database.
> These data will then be presented in different ways, via a web-
> frontend, webservices (rest), json and such.
>
> Would Rails be a usable way to do this, or should I go a different
> route? If so, what route should I go?
>   
Definitely Rails would be simpler than a lot of other choices.  Java 
would sound more 'enterprisey' than Rails.  I'd like to hear an answer 
to this question also actually.  We're currently doing this kind of 
thing as 'App servers' written in C++ (currently for Windows with either 
SQLite or PostgreSQL).  The thing just sits there and collects data and 
when someone wants it, it hands out the results, or does some 
processing, etc.  It's designed as an HTTP server, so it integrates 
rather seamlessly with the rest of the infrastructure, but is more 
time-consuming to do... than it would be in Rails.  However, it does 
give reasonably low memory footprints and because of the way that it is 
designed, it scales well with extra CPU power or cores (mostly it's 
stateless, so very few occasions to lock and wait, etc.).

Fortunately, we are not doing much stuff on the output side (where ERB 
templates would be great!), so I'm not complaining much.  Most of the 
output in our cases is either text or XML, but we have one server we 
built that does dynamic images).

I know my rambling isn't helping here, but you're not alone in that 
conundrum.

Cheers,
Mohit.
3/10/2009 | 5:33 PM.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Facing problem with Fastercsv on deployment server

2009-02-20 Thread Mohit Sindhwani

Dharmdip Rathod wrote:
> Hello , friends i am facing strange problem here.I have installed
> Fatercsv(1.2.3) for report export functionality, It's working proper on
> my development server.
>
> Development server = WinXp Professional V 2002 SP2
>= Rails version 2.0.2
>= Environment development
>
> Deployment server  = Linux platform
>= Rails version 2.0.2
>= Environment Production
>
> I am getting error like no such file to load --Fastercsv.
Is Fastercsv installed in production?

Cheers,
Mohit.
2/21/2009 | 1:37 PM.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: rails hosting

2009-02-17 Thread Mohit Sindhwani

bramu...@gmail.com wrote:
> Hi All,
>
> I am looking for the cheapest rails hosting with mysql support.
> Can you please let me know the best rails hosting when price is
> concerning. Are there any free rails hosting servers??
>
> Thanks,
> Ramu.

I find HostingRails good enough for most things.  I have a couple of 
Radiant sites and a Mephisto blog deployed to the same host.  All work 
acceptably.  Their cheapest plan will set you back by about US$4.00 per 
month.  If you're just playing around, I think their shared hosting is 
quite decent.  You can see http://onghu.com/te and 
http://notepad.onghu.com/ for response time, etc.

NOTE: The link below is an affiliate link (i.e., I will benefit a bit if 
you eventually sign up):
http://www.hostingrails.com/home/736175440

The following link is without affiliation:
https://www.hostingrails.com/

I can vouch for their tech support - it is quite quick and responsive.

Cheers,
Mohit.
2/18/2009 | 11:37 AM.




--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Testing on Linux VM on winXP 3 times faster than XP

2009-02-08 Thread Mohit Sindhwani

Phlip wrote:
> Right - the program loader is pathetic. It assumes we want to load MS
> Office, once, and live inside it for a while. It can't comprehend
> scripts that call many small executables.
>   
Is it just the loader that is slow?  Or is there something that can be 
done in the way of passing extra information (such as fully qualified 
paths or something) that would help.  I don't want to start a discussion 
about the "better OS" or "quit Windows", etc. but given the install base 
of Windows, it would be good to know if there are things that one could 
investigate to speed up Ruby on Windows.

Cheers,
Mohit.
2/9/2009 | 11:13 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Regular Expressions for Leading white space

2009-02-06 Thread Mohit Sindhwani

Philip Hallstrom wrote:
>> Can Anyone help me with regular expression which checks the string, if
>> it contains Leading whitespaces.
>> example
>> => admin
>> it contains leading space with it.
>> so i need to check it.
>> pls help me.
>> 
>
> Read up on the Regex class and pattern matching in general...
>
> str = " some string with a leading space"
>
> if str =~ /^\s/
>puts "we have a leading space"
> else "
>puts "we don't"
> end
>   
Not directly related, but if you just need to remove the leading/ 
trailing spaces, you could use lstrip, rstrip and strip on strings.

Cheers,
Mohit.
2/7/2009 | 2:25 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: under windows: launching an external app via system... but not waiting for a response

2009-02-01 Thread Mohit Sindhwani

phil wrote:
> Hi,
> I have an application written in Ruby (it's actually a windows
> service). It needs to launch other applications. The problem I am
> having is that when I call system("args to launch app") it never
> returns, because I guess the app never returns until it is closed.
>   
Do a
system ("start application.exe args to launch app")


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How to share tables between Ruby Apps...

2009-01-27 Thread Mohit Sindhwani

LaughingNinja wrote:
> Hi,
>
> We are in the process of rewriting our intranet applications in Ruby.
> We have one complete that requires an email invite being sent. We want
> to write another app that simply looks for unsent emails and sends
> them. This will be used by several ruby apps. How can we share this
> table(email details) across several Ruby apps?
>
> Thanks,
> GARY LACKERMAN
> Software Developer
>   
You could create a message queue in a shared database of some sort.  All 
applications insert their "to send" emails into the message queue 
(database table) and a regular job starts up and reads in the details 
and tries to send them.  If it manages to send it, it cleans up for this 
record (i.e, deletes the item from the table and/ or informs someone).  
If it doesn't manage to send the email, it increments some sort of 
"retry count" in the database and waits again.  If a message fails to go 
after a certain number of tries, it simply marks the message as 
undeliverable and removes it from the message queue to a "failed items" 
database.

Now, I wonder if there is a message queue implementation in Ruby that 
does this?

Cheers,
Mohit.
1/28/2009 | 11:50 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] SMF Forum + Rails - any experience?

2009-01-08 Thread Mohit Sindhwani

Hi, I'm trying to see if I can get Simple Machines Forum (SMF) coexist 
with a Radiant CMS site.  So far, I have only found this: 
http://railsforum.com/viewtopic.php?pid=49374 which gives some idea.  
Also, SMF exports out some data such as 'Recent Posts' that I should be 
able to parse and create some pages on that basis.

Now, my Radiant site needs login - not to manage the content, but to 
possibly post comments.  I was wondering if anyone has any experience in 
sharing user logins, etc. between SMF and Rails?

Any general experience with both?

Thanks,
Mohit.
1/9/2009 | 2:05 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Calling System on winows batch file

2009-01-06 Thread Mohit Sindhwani

Ryan Mckenzie wrote:
> Hello everyone,
>
> I'm using InstantRails 2.0 on a Windows XP 32 bit system.
>
> I'm developing a Rails application where I would like to execute a .bat
> file
>
> I've had a look around and this piece of code is suppose to do the trick
> but it does not seem to work.
>
> system('path/to/file.bat')
>   
Should not need anything special.  How do you know it doesn't work?
Also, are you using forward slashes in the path?  That may not work.
Are there spaces in the path to file.bat?  That may not work.

Cheers,
Mohit.
1/7/2009 | 12:41 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Need a ROR Programmer for a CMS

2008-12-27 Thread Mohit Sindhwani

SEMG wrote:
> hello - I am looking for a ROR programmer to build a CMS.  I have not
> had much luck! We are currently using Drupal, but am interested in
> going towards ROR since we are rebranding anyways.  It's an
> entertainment/lifestyle/pop culture site so we need to be able to
> manage our articles, create content dynamically, manage images, polls/
> forms, streaming video through flash player, etc.
>
> Please email me if anyone is interested with any links and fees!
> N
>   
Check out Radiant pros:
http://wiki.radiantcms.org/Radiant_Pros

There's a long list of companies there.

Cheers,
Mohit.
12/27/2008 | 11:22 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Advice on Mac versus PC ?

2008-12-26 Thread Mohit Sindhwani

wbsurf...@yahoo.com wrote:
> Thanks for the advice,
>
>  Can a mac read an external USB drive that came from a Windows XP
> machine ?
>
>  The mac sounds interesting. I like the idea of being able to pop open
> a native shell to the system and do 'ps -ef' and see what is running
> and be able to write a ruby script that does a fork() that works
> correctly etc.
> I use cygwin on windows, but it doesn't feel the same ..
>
>  I know you can install dual windows/linux using VM-Ware or some such,
> but it sounds complicated to me. I guess I don't like the idea of
> reinstalling windows, but if I am going to stick with windows, I guess
> I need to consider that. I'd be affraid that one of my backup CD's
> would go bad or that I would screw it up somehow. I'm wondering if I
> can backup windows to an external drive and reinstall it that way ?
>
>   
I think you could get something like Acronis True Image and that can do 
a lot of stuff including backup your entire OS image and your data.  If 
something goes off, you can probably restore the image within a couple 
of hours almost back to where you left it.
http://www.techsupportalert.com/drive-imaging-reviews.htm

Cheers,
Mohit.
12/27/2008 | 2:22 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: DIY -> HOW TO make own Rails server [4 dummies]

2008-12-26 Thread Mohit Sindhwani

Bartosz Wais wrote:
> Hi guyz,
>
> I got idea to build over lazy Christmas period dedicated rails server
> for rails just for home use.. so instead wasting that time for trying
> maybe somebody can give me a hint what is the easiest.. or quickest
> way to make it.
>
> I got old pc(dell laptop with 700Mhz.. and 256 ram.. ) no OS yet ..
>
> any suggestions?
>
> thanks and Marry Christmas, folkz.
Easiest is probably to base it on Ubuntu or CentOS.
Most efficient is likely to be Gentoo - given the older hardware that it is.

I think others have already given hints on what can be done.  I wonder 
if the EngineYard image is usable..

Cheers,
Mohit.
12/26/2008 | 10:57 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: mySQL databases and Radiant...uggg

2008-12-26 Thread Mohit Sindhwani

Ryan Ororie wrote:
> * Trying * (hard) to get Radiant CMS to work for me here. Based on these
> instructions:
>
> http://wiki.radiantcms.org/Database_Configuration
>
> I created my development database, but when I try to use the 'grant all'
> command to tell it the user name and pass this is what I get:
>
> mysql> grant all on radiant_cms_development.* to root@'%' identified by
> 'root';
> ERROR 1044 (42000): Access denied for user ''@'localhost' to database
> 'radiant_cms_development'
>
> I am assuming that I created it properly based on this:
>
> bio4054059:radiant_cms rmorourk$
> /Applications/MAMP/Library/bin/mysqladmin -u root -proot create
> radiant_cms_development
> bio4054059:radiant_cms rmorourk$
>
> This is what the development portion of my database.yml file looks like
> after I edited it:
>
> development:
>   adapter: mysql
>   database: radiant_cms_development
>   username: root
>   password: root
>   host: localhost
>   socket: /Applications/MAMP/tmp/mysql/mysql.sock
>
> So I don't know why I am getting an "accessed denied for user" ping
> back, clearly those are the user name and password. Can I set the host
> on this file to anything localhost:3006 ?
>
> I know I have been posting a lot, but you guys have been a big help so
> far - hoping the charity of knowledge continues. Thanks!
>
> I feel like I got my rails setup off on the wrong foot - my mySQL stuff
> is buried under the MAMP installation, I'm using locomotive which as far
> as I can tell stops the terminal from setting up servers at the normal
> local host. (it must all be done via locomotive). Any other advise on
> how to "start-over" so to speak and use the proper way of doing things
> with nice default-esc paths?
>   
Is your 'root' user configured to have a password 'root'?

Cheers,
Mohit.
12/26/2008 | 4:34 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Deploying Radiant - why can't anything ever just work?

2008-12-26 Thread Mohit Sindhwani

Patrick Doyle wrote:
> On Sun, Dec 21, 2008 at 10:03 PM, Ryan Ororie 
>  > wrote:
>
>
> So I have been tinkering with Rails all week - I'm a designer, not a
> developer, but I'm looking to expand my knowledge. I created an
> instance
> of Radiant, the cms, and am looking to fiddle with it and then try
> putting it on a server.
>
> I have the 'radiant project' created here:
> RAILS_ROOT: /Users/rmorourk/Sites/radiant_test
>
> When I use locomotive to point this directory at port 3004, I get the
> following error on viewing:
>
> Could not find table 'config'
>
> Although the config table is definitely there.
>
> I used SQLite 3 as the database. I'm assuming, sense I am trying to
> access it locally, that it is looking at the development database - my
> config/database.yml file looks like this:
>
> development:
>  adapter: sqlite3
>  database: db/development.sqlite3.db
>
> What am I doing wrong here? Do I have to activate the sqlite somehow?
> Any advise would be appreciated.
>
> I'm not familiar with Radiant, but you might try:
>
> $ rake db:migrate
>
> at the command prompt, unless the installation instructions said 
> something about creating and initializing the database.
>
> The "rake db:migrate" command will create the database from scratch.

Sorry for the trouble you're experiencing.  Try the Radiant mailing list 
- you're likely to get good help there also.  That said, as a general 
guideline, you should never really need to run in development (that part 
is for developing the CMS itself, not the content).  You should run in 
production.

Also, when you do that, make sure you follow the instructions over at 
the site.

The documentation is a bit all over the place right now, but is being 
reorganized.  Take a look at: http://wiki.radiantcms.org/Summer_Reboot 
for bits of documentation that will help.

Also, specifically see: 
http://wiki.radiantcms.org/Create_your_first_Radiant_project (with 
video, I believe) and then see: http://wiki.radiantcms.org/Getting_Started

Make sure that you're on Ruby 1.8.6 - there are still a few kinks with 
Ruby 1.8.7.

Cheers,
Mohit.
12/26/2008 | 4:28 PM.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How to get one columns as an array from database

2008-12-25 Thread Mohit Sindhwani

Zhao Yi wrote:
> Ryan wrote:
>   
>> I think it's been around since Rails 2.1
>>
>> Project.first
>> Project.last
>> Project.all
>>
>> all work.
>> 
>
> I think the first last and all refers to rows. I want to select columns.
>   
If I'm not wrong, relational algebra doesn't identify a sequence between 
the elements of a row, i.e., I don't think it gives you the ability to 
select a column specifically.  That said, you could probe for the schema 
and get the elements using that - something like how the dynamic 
scaffold used to work in earlier Rails.

Cheers,
Mohit.
12/26/2008 | 1:27 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RForum on Rails 2.x

2008-11-26 Thread Mohit Sindhwani

Mohit Sindhwani wrote:
> Hi!  Has anyone tried to/ is running RForum on Rails 2.x? 
>
> At least as deployed to Ruby Forum, it seems super fast with multiple 
> forums, has good follow-up features (e-mail), a decent messaging system 
> between users, very decent anti-spam features and a whole host of nice 
> things - it does seem to be one of the most feature-complete Rails-based 
> forums.
>
> Now, looking around shows that it was last updated date at the end of 
> 2005 - that's the only downside.  If I'm to use it for a site that we'd 
> like to keep alive for a year or more, it would be good to know if it's 
> working with Rails 2.x - I guess the main worry is that hosts will 
> eventually upgrade to Ruby 1.8.7 (or newer) and that will break the 
> older Rails and that would break the RForum.
>
> So, coming back to the question - has anyone tried to/ is running RForum 
> on Rails 2.x?
>
> Thanks!  All inputs deeply appreciated.
>   
Anyone?  Or is everyone using Beast (Savage/ Altered) or El Dorado for 
their forum needs?

Cheers,
Mohit.
11/27/2008 | 12:44 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: [JOBS] Excellent Job Opportunity: Lead Engineering (Ruby on Rails), New Delhi

2008-11-25 Thread Mohit Sindhwani

Chad Woolley wrote:
> On Tue, Nov 25, 2008 at 2:12 AM, Frederick Cheung 
> <[EMAIL PROTECTED] > wrote:
>
>
>
> On 25 Nov 2008, at 06:58, Jitendra Singh wrote:
>
> >
> > We are looking for motivated Ruby on Rails/Java technology
> >
> When you find yourself posting the same message 4 times in 10 days
> then you're doing something wrong.
>
> Fred
>
>
> Yes.  I don't think any of us want to move to New Dehli.  Swing the 
> ban-hammer!
While I agree with Fred, I think Chad's message is a bit strong.  There 
are 10,000+ members on the list and numerous anonymous visitors, I'm 
sure.  It's a bit odd for you to assume that no one else in the world 
wants to move to New Dehli (sic).

Cheers,
Mohit.
11/26/2008 | 2:01 AM.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] RForum on Rails 2.x

2008-11-25 Thread Mohit Sindhwani

Hi!  Has anyone tried to/ is running RForum on Rails 2.x? 

At least as deployed to Ruby Forum, it seems super fast with multiple 
forums, has good follow-up features (e-mail), a decent messaging system 
between users, very decent anti-spam features and a whole host of nice 
things - it does seem to be one of the most feature-complete Rails-based 
forums.

Now, looking around shows that it was last updated date at the end of 
2005 - that's the only downside.  If I'm to use it for a site that we'd 
like to keep alive for a year or more, it would be good to know if it's 
working with Rails 2.x - I guess the main worry is that hosts will 
eventually upgrade to Ruby 1.8.7 (or newer) and that will break the 
older Rails and that would break the RForum.

So, coming back to the question - has anyone tried to/ is running RForum 
on Rails 2.x?

Thanks!  All inputs deeply appreciated.

Cheers,
Mohit.
11/25/2008 | 11:24 PM.




--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: loops

2008-11-24 Thread Mohit Sindhwani

Smarty 2k wrote:
> hi friends
>
> please help me
>
> for (int i=0; i < total; ++i)
> {
>   // do something here
> @blogid=params[:blog][:s.id]   # multiple row
> }
>
> Convert Ruby loops
>   

I'm not sure what you are trying to do, but a primer in Ruby loops will 
help, from the look of it:
http://www.rubyist.net/~slagell/ruby/control.html
http://www.techotopia.com/index.php/Looping_with_for_and_the_Ruby_Looping_Methods

Cheers,
Mohit.
11/24/2008 | 7:14 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Installed Ruby on Rails (and Aptana RadRails), checked application environment, and got a big error

2008-11-13 Thread Mohit Sindhwani

glassangel wrote:
> I'm working out of the book RailSpace, and when I installed it, it
> installed Mongrel, but apparently not SQLLite, and I recieved this
> error message:
>
> no such file to load -- sqlite3
>   
then, you just need to install SQLite3 - search up to find a guide for 
your OS.  It's quite simple.  You will also need to install the 
appropriate Ruby gem for it.

Cheers,
Mohit.
11/14/2008 | 9:45 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Deploying Production Rails on Windows Server

2008-11-13 Thread Mohit Sindhwani

iplat wrote:
> Hello Everyone,
>
> I'm in need of a good guide that will describe how to deploy Rails in
> a production environment on windows. Unfortunately, I have no choice
> on the platform so I need to find something that will help me through
> this painful task. I'd like to know the best way and any links to
> guides to deploy a production ready rails application.
>
> Thanks in advance!

If I remember correctly, Ezra's "Deploying Rails Applications" does have 
a section on Windows.
http://www.pragprog.com/titles/fr_deploy/deploying-rails-applications

Cheers,
Mohit.
11/13/2008 | 11:06 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Recommended Reading for..

2008-11-12 Thread Mohit Sindhwani

Bill Walton wrote:
> Hi Mojit,
>
> Mohit Sindhwani wrote:
>
>   
>> For one of my sites, I want to create a developer API so that other
>> people can leverage of what we build to quickly put together their own
>> solutions (I guess something like Google Maps is a good parallel
>> example).  We'd like to control who uses it since we have data providers
>> who would like to know when we pass data on to someone else.
>>
>> What would you recommend that I read?  It's fine if it's a book (doesn't
>> need to be only online articles though those would give me a good start
>> also).  [needless to say, Rails would be my preferred choice].
>> 
>
>
> I'd recommend picking up "RESTful Web Services"
> (http://www.amazon.com/RESTful-Web-Services-Leonard-Richardson/dp/0596529260
> ).  It gave me an expanded view; quickly.  Googling the same three words
> gives good results too.
>
> HTH,
> Bill
>   
Thanks Bill - I shall take a look at that!

Cheers,
Mohit.
11/13/2008 | 12:22 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Book Recommendation for fast drop into webdesign

2008-11-11 Thread Mohit Sindhwani

Jeffrey Goines wrote:
> Mohit Sindhwani wrote:
>   
>> It's not HTML but I really enjoyed reading "Stylin' with CSS: A
>> Designer's Guide" - I thought it was written in a very accessible manner
>> and it helped me, a CSS-nobody to get a reasonably good idea of the
>> basics so that my sites stopped looking ugly.
>> 
>
> Mohit, thank you so much for telling me, I guess this book is very very 
> close to what I was looking for!!
>
> It's not available at my University but I'm reading it now on 
> safaribooksonline (trial) and find that very convenient.
>   
Glad to help!  I'm more of an engineer and it brought me just enough 
knowledge :)

Cheers,
Mohit.
11/12/2008 | 12:56 AM.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Recommended Reading for..

2008-11-11 Thread Mohit Sindhwani

For one of my sites, I want to create a developer API so that other 
people can leverage of what we build to quickly put together their own 
solutions (I guess something like Google Maps is a good parallel 
example).  We'd like to control who uses it since we have data providers 
who would like to know when we pass data on to someone else.

What would you recommend that I read?  It's fine if it's a book (doesn't 
need to be only online articles though those would give me a good start 
also).  [needless to say, Rails would be my preferred choice].

Thanks,
Mohit.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Book Recommendation for fast drop into webdesign

2008-11-09 Thread Mohit Sindhwani

Jeffrey Goines wrote:
> hello,
>
> I did some web design quite a while ago and now i have some time to get
> back into it but i want it as fast as possible and what i'm really
> lacking is some good resource how to restart.
>
> it's like that i need the general html design patterns plus css in an
> accesible way.
>
> then i want to go dymanic with ruby on rails.
>
>
> i couldn't find any book that is not mainly html for beginners or just a
> reference or creating some very particular design but one that talks
> about how various often encountered design solutions are usually done
> today. it maybe would be a lot on css but i don't want to learn a lot of
> attributes, just the general principles and then maybe an editor which
> does display all propertys i can sensefully set (maybe i'll use coda?).
>   
It's not HTML but I really enjoyed reading "Stylin' with CSS: A 
Designer's Guide" - I thought it was written in a very accessible manner 
and it helped me, a CSS-nobody to get a reasonably good idea of the 
basics so that my sites stopped looking ugly.

Cheers,
Mohit.
11/10/2008 | 3:24 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Validating email

2008-11-07 Thread Mohit Sindhwani

Sijo Kg wrote:
> Hi
>   I have a mailid like [EMAIL PROTECTED]@   As part of email validation
>
>  I have to check it [EMAIL PROTECTED] So I did
>
> "[EMAIL PROTECTED]@@".split('@')  So I get ['test','123.com']   But if it
> were [EMAIL PROTECTED]  the expected validation is correct But the lase two @
> signs are not recognized by split So how can check that after 123.com
> still there is @ sign and declare my validation as failed?
>
> Sijo
>   
I can't explain why it doesn't recognize but you could add something to 
the end of the address and split.

irb(main):014:0> a = '[EMAIL PROTECTED]@@'
=> "[EMAIL PROTECTED]@@"
irb(main):015:0> a.split('@')
=> ["test", "123.com"]
irb(main):016:0> a = a + 'trash'
=> "[EMAIL PROTECTED]@@trash"
irb(main):017:0> a.split('@')
=> ["test", "123.com", "", "trash"]
irb(main):018:0>

Hope this helps.

Cheers,
Mohit.
11/7/2008 | 5:29 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Unable to install sqlite3

2008-11-02 Thread Mohit Sindhwani

This is a known problem.  Hope the link below helps:
http://domhackers.blogspot.com/2008/09/sqlite3-ruby-gem-on-windows.html


Cheers,
Mohit.
11/3/2008 | 2:04 PM.


Hammer Ting wrote:
> I am new to Ruby. Try out a web application, but when I tried to access
> the page, it has the following error (see ERROR 1 below).
>
> So I thought I may have not installed "sqlite3" and tried downloading
> "sqlite_3-6-4.zip" and "sqlitedll_3-6-4.zip", unzipped it and place it
> in ruby's bin directory. Then I run the command:
>
> gem install sqlite3-ruby
>
> But found myself encounter the another error shown below (see ERROR 2).
>
> Any help would by wonderful
>
> == ERROR 1
> =
> MissingSourceFile (no such file to load -- sqlite3):
> C:/Programs2/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `g
> em_original_require'
> C:/Programs2/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `r
> equire'
> ..
> ..
> C:/Programs2/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `r
> equire'
> script/server:3
>
> Rendering
> C:/Programs2/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_c
> ontroller/templates/rescues/layout.erb (internal_server_error)
> == ERROR 1
> =
>
>
>
> == ERROR 2
> =
> C:/Programs2/Ruby>gem install sqlite3-ruby
> Building native extensions.  This could take a while...
> ERROR:  Error installing sqlite3-ruby:
> ERROR: Failed to build gem native extension.
>
> C:/Programs2/Ruby/bin/ruby.exe extconf.rb install sqlite3-ruby
> checking for fdatasync() in rt.lib... no
> checking for sqlite3.h... no
>
> nmake
> 'nmake' is not recognized as an internal or external command,
> operable program or batch file.
>
>
> Gem files will remain installed in
> C:/Programs2/Ruby/lib/ruby/gems/1.8/gems/sqli
> te3-ruby-1.2.4 for inspection.
> Results logged to
> C:/Programs2/Ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ex
> t/sqlite3_api/gem_make.out
> == ERROR 2
> =
>   


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: The Forum Hunt continues...

2008-10-30 Thread Mohit Sindhwani

Fernando Perez wrote:
> There is 'altered beast' which is based of the no longer maintained 
> 'best' forum app.
>
> But if you want a truly slow and insecure server, then please use phpBB.
>   

Hi Fernando, thanks for the reply.  So, it does seem that the general 
feedback is to avoid phpBB.
In Rails, all options are still open to me... my curiosity is currently 
piqued by Vanilla which is something that looks very interesting.

Cheers,
Mohit.
10/31/2008 | 4:48 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] The Forum Hunt continues...

2008-10-30 Thread Mohit Sindhwani

I'm still looking around for a good forum to integrate with a Radiant 
site that I'm working on, and I have narrowed it down to three options 
in the Rails world:
(a) RForum - that seems to be updated less frequently, but seems quite good!
(b) Altered Beast - quoted as an exemplary Rails 2 application
(c) El Dorado - Seems quite nice and has nice extra features

As such, my main requirements are quite simple:
(a) Multiple forums, discussions and messages
(b) Good spam controls and support for moderating messages, users, etc.
(c) User control and registration
(d) Some integration with e-mail (like watching threads) - optional.
(e) Support for multi-lingual messages (UI doesn't need to be)
(f) Some support for Integration: modify style sheets, simple recent 
messages page, a simple user model, etc.

Looking around in the non-Rails world, I find that PhpBB is popular but 
has a bad name when it comes to security and some people say that it is 
quite hard to integrate with/ change.  Another one I stumbled across is 
called Vanilla and it seems to have a good reputation for a clean UI and 
ease of integration and support for add-ons.  URL: http://getvanilla.com/

Does anyone have any suggestions/ experience to share?  It is acceptable 
for the BBS to run on a separate sub-domain from the Radiant site.  
There is no need for there to be very tight integration between the two.

Thanks for your help.

Cheers,
Mohit.
10/31/2008 | 2:19 AM.





--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Can not install sqlite3-ruby

2008-10-28 Thread Mohit Sindhwani

Khaled mahmud Khaled wrote:
> Hi Friends,
>
> I could not setup sqlite3. When I type "gem install sqlite3-ruby
> --version 1.2.4" in the command prompt. The following problem is
> arising.
>   
On Windows, I think you need 1.2.3 - so you should do:
gem install sqlite3-ruby --version 1.2.3

That should get it working.

Cheers,
Mohit.
10/28/2008 | 10:29 PM.





--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: [ANN] El Dorado - an open-source forum in Rails

2008-10-22 Thread Mohit Sindhwani

Trevor Turk wrote:
> Thanks for your reply, Mohit. It's silly that I forgot to mention Beast, 
> of course. I guess I overlooked it because everybody already knows about 
> it...? Beast is a great app, and a good pick for integration as well, 
> mainly because it's so small and widely used. I referred to Beast a lot 
> when learning Ruby/Rails and working on El Dorado, so I can say from 
> experience that it's a well-written and solid app.
>   

Currently, my very short list is Beast and El Dorado!

> As for El Dorado and possible Radiant integration of whatever depth, I 
> look forward to any suggestions, requests, or contributions you may 
> have. It's probably easier for me if we pick up the conversation over 
> here:
>
> http://eldoradoapp.com/
>   

See you there!

Cheers,
Mohit.
10/23/2008 | 9:30 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: [ANN] El Dorado - an open-source forum in Rails

2008-10-21 Thread Mohit Sindhwani

Hi Trevor

Thanks for the long message.  I do appreciate the reply.  I've been 
following the project (in terms of watching the mailing list posts to 
the Rails mailing list) and haven't seen much about it.  That either 
means it works really well or people aren't using it or people are going 
elsewhere for support!  I noticed yesterday that the El Dorado Forum 
itself is quite active... so, I'm now going to start tracking it.

It looks nice, seems to have many features that I want - now, I need to 
suck it down, install it and play with it.  Was just looking for a 
"heads up - beware!" message before starting out.  Given that there have 
been none yet, it's probably a good idea to go ahead with it :)

As you're probably well aware, Beast (and its variants) are most 
commonly cited as options for integrating into regular apps... so, I was 
just doing a check before I start to evaluate.

The remaining answers are inline.

Trevor Turk wrote:
> I'm the developer of El Dorado. I can't speak to how many people are 
> using the app, but I've seen it around a bit. I'm under the impression 
> that some people have forked the code, or used it for internal projects, 
> etc as well. The people over at FiveRuns just posted a automatic 
> installation that features El Dorado as well:
>
> http://eldoradoapp.com/topics/249
>   

Ya, I noticed this from the site - that's cool :)

> I've been happily using the app for a few sites that are active, and 
> I've been continuing to add new features from time to time. I don't 
> think there are any major bugs or issues, but of course there are still 
> areas that could be improved and such. I've certainly been maintaining 
> and using the app, though, so I know that it's useable.
>   

Good enough for me!  It gives me enough confidence to go ahead and start 
evaluating it for our needs.  I do like some of the stuff that's catered 
for small companies - and I think that will see us use El Dorado for 
more than just 1 thing in the near future.

> I'd love to see El Dorado integrated into Radiant, so please do let me 
> know if you'll be working on that. Even if you won't be putting it back 
> out into the open-source community, it would be fun to see the product.
>   

I would be careful of claiming "integrate" just yet. 

[1] The most likely scenario currently is that Radiant runs on 
http://www.example.org/ and El Dorado runs on http://bbs.example.org/

[2] The second most important thing is likely to be a need to make sure 
that somehow Radiant and El Dorado can share the same user 
authentication method (for Radiant, this would NOT be the admin login to 
post content)

[3] This would most likely be followed by an integration where I add a 
sidebar in Radiant (so, I'd need to add Radius tags) that will allow us 
to copy across the 10 most recent posts (subject, title, author, etc.) 
to the Radiant site's home page (or any other page for that matter).  
I've done this before using Yabb2 - that site is currently offline, 
otherwise I'd post you a link.  So, what I'd need from El Dorado is a 
not too complex page of 'most recent posts' and then parse that in on 
the Radiant side.

[4] I'd like to then see if it's possible to add simple things like tags 
that allow you to search for BBS posts related to the current page in 
the forum.  So, I'm thinking that you could do  and this would find you some posts related to 
'form_helper' and if it that comes back in a good easy to parse format, 
I'd like to show that on the Radiant page.

[5] Finally (and this is a big problem), I'd like to see if it's 
possible to use the 'home page' of the user inside El Dorado for adding 
more things - e.g., if he could bookmark something in the Radiant site, 
it could show up inside this user home page area.

What do you think?

> I should note that there are some other good alternatives that may be 
> easier to integrate into an existing Rails app. I don't have extensive 
> experience with them, but here are the ones I'm aware of:
>
> http://adva-cms.org/
> http://www.toghq.com/
> http://www.communityengine.org/
>   

I'm aware of this, but I have spent quite a bit of time with Radiant and 
the site that I have this in mind for is already starting out on 
Radiant.  Additionally, I'm helping to coordinate a project called 
'Summer Reboot' that is helping to create documentation for Radiant, so 
for now, that's the chosen one: http://wiki.radiantcms.org/Summer_Reboot

> Of course, I've built El Dorado to work in a way that I like, and I 
> think it's a terrific app. Please do let me know if you decide to use it 
> for anything - this is the whole reason that it's fun to work on 
> open-source projects :)
>   

Of course, I will.  I think the main features that I'm looking for are:
1. Ease-of-use
2. Ease-of-integration (e.g. the simple pages that allow me to integrate 
with Radiant)
3. Spam control/ management - this is really troublesome naturally!  I 
have this working quite well on the Mailing Lists

[Rails] Re: [ANN] El Dorado - an open-source forum in Rails

2008-10-21 Thread Mohit Sindhwani

Trevor Turk wrote:
> I'm pleased to announce the first public release of El Dorado: a 
> full-stack community web application written in Ruby/Rails.
>
> The app features a forum, community event calendar, shared file storage, 
> and a randomized header image gallery.
>
> It can import content from existing sites running PunBB. The forum is 
> somewhat modeled on PunBB, and is nearly feature complete.
>
> I've been using this app in production since late July '07. The 
> setup/administration process still leave something to be desired, but 
> the end-user functionality is quite well tested.
>
> http://almosteffortless.com/eldorado/
>
> In terms of PunBB features, I don't think the power-user will be fully 
> satisfied. There not much in the way of user administration tools (post 
> throttling, ip-banning) and some major features are still not 
> implemented (subscriptions). However, the basics are pretty solid, and 
> the regular users of my small forum have been satisfied for a while now.
>
> Please have a look and let me know what you think!
>   
I know I'm replying to a really old email, but I was wondering how 
things are going with El Dorado?  Are many people using it?  Any obvious 
problems?

I'm looking to integrate something alongside a Radiant website, with the 
main need being that the 2 should be able to share some sort of user 
model (not the Radiant Admin UI model).  So, I was wondering if people 
have used it and have some comments to share.

Thanks
Mohit.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Serving a PDF document

2008-10-09 Thread Mohit Sindhwani

Simon Macneall wrote:
> Hi all,
>
> Been banging my head against this for a little while so figured I see if  
> anyone here could light the way.
>
> Our site receives input from fillable pdfs as XML (XFDF to be precise) and  
> processes the information. We also need to be able to re-export the filled  
> PDF. To do this you send the xfdf file with an href to the original pdf  
> document.
>
> If I point the href to a static PDF (so, put it in the public folder)  
> adobe opens and fills the pdf correctly. However, if I point to the pdf  
> using a dynamic URL to rails then Adobe just doesn't fill the pdf.
>
> So my question, what is the difference between
> http://localhost:3000/pdfs/TACServiceReport0908.pdf - where pdfs is a  
> folder in the public folder of the app
> and
> http://localhost:3000/forms/show/4.pdf - this renders the exact same file  
> using one of the following (I have tried them all)
>
> send_file(@form.pdf_filename, :type => 'application/pdf', :dispoisition =>  
> 'attachment')
> send_file(@form.pdf_filename, :type => 'application/pdf', :dispoisition =>  
> 'inline')
>   

I'm sorry I can't help you directly but is the above spelling error for 
disposition actually there in your code?

> send_data(content, :filename => filename, :type => "application/pdf",  
> :disposition => "inline")
> send_data(content, :filename => filename, :type => "application/pdf",  
> :disposition => "attachment")
>
> and how can I make the second method behave like the first.
>   



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Internet Explorer and Windows Media Player cause double send_file downloads?

2008-10-07 Thread Mohit Sindhwani

[EMAIL PROTECTED] wrote:
> On Oct 4, 9:59 pm, Mohit Sindhwani <[EMAIL PROTECTED]> wrote:
>   
>> [EMAIL PROTECTED] wrote:
>> 
>>> Hi,
>>>   
>>> Our Rails application allows WAV file downloads.  The user clicks on a
>>> link, or
>>> clicks a button, and the WAV file gets sent as a response, using
>>> send_file.
>>>   
>>> It looks like IE is discarding the initial WAV file and passing the
>>> URL to Windows
>>> Media Player.  Windows Media Player then re-requests the file!!
>>>   
>>> In addition to the performance problems, this design problem causes
>>> failures in the
>>> case of the download being initiated from a POST, since the re-request
>>> from the
>>> Media Player is only a GET, not a POST.
>>>   
>>> How do I prevent this re-request?
>>>   
>> I have found that the way that works for me (I use this for PNG) is to
>> serve it up with the mime type 'application/unknown' so that IE does not
>> try to interpret what program should handle the information coming down.
>>
>> Cheers,
>> Mohit.
>> 10/5/2008 | 10:59 AM.
>> 
>
>
> I tried setting the 'type' to 'application/unknown'.
>
> The problem persists.  The Windows Media Player re-requests the file,
> using an http GET request.
>
> Any ideas?
Does it work in Firefox?  Does it show that the MIME type is unknown?
Sorry, I'm out of ideas for now in that case.  Hopefully someone else 
can help.

Cheers,
Mohit.
10/8/2008 | 12:56 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Internet Explorer and Windows Media Player cause double send_file downloads?

2008-10-06 Thread Mohit Sindhwani

Philip Hallstrom wrote:
>> Our Rails application allows WAV file downloads.  The user clicks on a
>> link, or
>> clicks a button, and the WAV file gets sent as a response, using
>> send_file.
>>
>> It looks like IE is discarding the initial WAV file and passing the
>> URL to Windows
>> Media Player.  Windows Media Player then re-requests the file!!
>>
>> In addition to the performance problems, this design problem causes
>> failures in the
>> case of the download being initiated from a POST, since the re-request
>> from the
>> Media Player is only a GET, not a POST.
>>
>> How do I prevent this re-request?
>> 
>
> I don't think you can.  Years ago a collegue had an issue with large  
> PDF's being sent as a result of a POST.  The PDFs that were under 1meg  
> IE would download and then give that file to Adobe.  Above 1meg and it  
> would download some if it, then pass it to Adobe -- losing all the  
> POST variables in the process.
>
> The only solution we found was to convert that POST into a GET (or  
> redirect it to a temp url that is a get).  And suffer with the re- 
> sending.
>
> This was probably 6 years ago though... but sounds like it hasn't  
> changed one bit.
>   

I had a similar problem that a dynamically generated PNG was 
re-requested when a user right clicks and does a 'save' (both in FF and 
IE).  There was a GET request triggered after the initial POST that 
generated the image.

We got around this by setting the mime type to application/unknown for 
the content.  That way, IE and FF do not try to decode the content and 
do not try to 'support' it through plugins, external programs, etc.  I 
think it just asks to save the file.

I think I replied this in an earlier mail.  But, either way, hope this 
helps.

Cheers,
Mohit.
10/7/2008 | 1:13 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Internet Explorer and Windows Media Player cause double send_file downloads?

2008-10-04 Thread Mohit Sindhwani

[EMAIL PROTECTED] wrote:
> Hi,
>
> Our Rails application allows WAV file downloads.  The user clicks on a
> link, or
> clicks a button, and the WAV file gets sent as a response, using
> send_file.
>
> It looks like IE is discarding the initial WAV file and passing the
> URL to Windows
> Media Player.  Windows Media Player then re-requests the file!!
>
> In addition to the performance problems, this design problem causes
> failures in the
> case of the download being initiated from a POST, since the re-request
> from the
> Media Player is only a GET, not a POST.
>
> How do I prevent this re-request?
>   
I have found that the way that works for me (I use this for PNG) is to 
serve it up with the mime type 'application/unknown' so that IE does not 
try to interpret what program should handle the information coming down.

Cheers,
Mohit.
10/5/2008 | 10:59 AM.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Building Gem of a Rails app

2008-09-30 Thread Mohit Sindhwani

Chad A. wrote:
> I'm looking for advice about packaging a gem that runs as a rails
> app.  The rails app that I'm interested in is iClassify.  As as
> starting point, I'm soliciting nominees for good examples of gems that
> are meant to run as rails apps, not just gems that add functionality a
> bit of functionality to a rails app.  I would like to look at how the
> packager created the gem, and try to duplicate their effort.
>
> Any other advice, would also be greatly appreciated.
>
> Thanks,
> Chad A.
>   
Radiant CMS?

Cheers,
Mohit.
9/30/2008 | 10:53 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: CMS on Rails 2 and easy to integrate with?

2008-09-09 Thread Mohit Sindhwani

Tim Gossett wrote:
>
> done.
>
> http://wiki.radiantcms.org/Does_Radiant_have_what_I_need
>  
Excellent!  Thanks a lot :)

Cheers,
Mohit.
9/10/2008 | 9:13 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: [ANN] Kete 1.1, an open source Rails application for online communities, is here

2008-09-09 Thread Mohit Sindhwani

Walter McGinnis wrote:
> Hi Mohit,
>
> You can give Kete a try simply by asking questions you might have on 
> the Kete community site run on the software at http://kete.net.nz/ or 
> feel free to contact me offlist and I can point you at a demo site 
> where you can play around a bit.
>
> Glad to hear your enthusiasm.  I considered using Radiant before 
> starting the Kete project, but felt it was too CMS oriented for what I 
> was going for.
>
> Cheers,
> Walter

Hi Walter,

Thanks for the message.  I am going to almost certainly try to install 
and play with Kete in about a week or so.  I'm developing a technical 
community website (something like the PHP documents site) and this looks 
quite exciting.  Radiant was also a good start towards that, but I feel 
(and this is baseless) that Kete + Radiant might be very very powerful!

Cheers,
Mohit.
9/10/2008 | 9:11 AM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: CMS on Rails 2 and easy to integrate with?

2008-09-08 Thread Mohit Sindhwani

Tim Gossett wrote:
>
> Radiant  is the way to go. 
>  
> *snip*
>
>
Hi Tim

That's a fantastic list of things you've created.  Any chance that I 
could urge you to add it to the Radiant CMS Summer Reboot Documentation 
[1] project?  It may go in as something like "Does Radiant have what I 
need?"

[1] http://wiki.radiantcms.org/Summer_Reboot

Cheers
Mohit.



--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: [ANN] Kete 1.1, an open source Rails application for online communities, is here

2008-09-07 Thread Mohit Sindhwani

Walter McGinnis wrote:
> Kete 1.1 is now available with a giant helping of new features and 
> improvements.  This is also the first release where you can grab Kete 
> from our code repository's new home at Github.com. 
>  See http://kete.net.nz/site/topics/show/25-downloads for details or 
> browse the code online at http://github.com/kete/kete/.  For more 
> information about this release, please 
> see http://kete.net.nz/blog/topics/show/192-kete-11-is-here.
>
This looks very interesting and very promising!  I would like to try 
this.  I'm using Radiant CMS for a few things and feel that Kete seems 
to offer a lot of compelling features for knowledge base portal development.

Cheers,
Mohit.
9/8/2008 | 2:44 PM.


--~--~-~--~~~---~--~~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---