Wednesday, July 31, 2013
[Rails] Rails + Firebird (legacy database)
firebird.
I have installed firebird adapter and it seems it is working but is
always throwing an error:
Fb::Error: Undefined name Dynamic SQL Error SQL error code = -204 Table
unknown MSFCLIENTES At line 1, column 45 : SELECT "MSFCLIENTES".* FROM
"MSFCLIENTES" ORDER BY "MSFCLIENTES"."ID" ASC ROWS 1
the log shows like if it is quering the wrong table "RDB$DATABASE" (one
of the system tables), so if i change the table name to that table it
works but it isnt the table i need...
here is my model
class Client < ActiveRecord::Base
establish_connection(
:adapter => "fb",
:database => "localhost:/var/databases/MSFBASE.Ib",
#:database => "sales",
:username => "SYSDBA",
:password => "masterkey",
:charset => "NONE")
self.table_name = "MSFCLIENTES"
#self.primary_key = 'RDB$RELATION_ID'
#self.table_name = "RDB$DATABASE"
#self.primary_key = 'RDB$RELATION_ID'
# self.table_name = 'employee'
end
--
Posted via http://www.ruby-forum.com/.
--
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+unsubscribe@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/2dd056196c35739f23bc433adebc76cd%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: [JOBS] RoR, Bangalore Exp 4-6 Years - Tavant Technologies
On Friday, 26 July 2013 13:20:24 UTC+5:30, Shruthi Rangaraj wrote:
Hi,
Am heading the recruitment for an IT Company. Tavant Technologies is an IT solutions and services provider that employs cutting-edge and emerging technologies to provide game-changing results for its customers. Tavant specializes in building solutions and providing end-to-end services in the domain of Service Operations, Consumer Lending, eBusiness and Trading & Securities. Tavant's suite of products and services are routinely rated high by the industry & media and deployed by leading business names, like Electronic Arts, TiVo, MLB AM, New York Times, Ingersoll Rand, Bobcat, Federal Signal and many more. Tavant is an ISO 27001 compliant and SEI-CMMI level 4 compliant organization. Tavant's employees delight their customers through their passion and excellence. Every time. Without exception.
Currently we are looking for resources who specialize on ROR skills. Please contact me for any further details.
Please find the JD Below
Skill Set
Detailed job Description
Ruby on Rails
· BS/MS with 4-5 years of web application development in Ruby on Rails
· Design and implement new features and optimize existing ones from controller-level to UI
· Experience building large scale systems in a high availability production environment
· Must have excellent hands-on experience building Ruby on Rails based web applications
· Good understanding of Object Orient design principles, MVC architecture, and web-services RESTful APIs and design patterns.
· Excellent knowledge of version control systems like GIT, SVN
· Excellent analytical and problem solving skills
· Outstanding written and verbal communication and interpersonal skills
· Experience with agile methodologies like SCRUM
· Experience using databases like MongoDB
· Exposure to cloud computing platforms like Amazon
· Knowledge of message queues
Regards
Shruthi Rangaraj
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+unsubscribe@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/e05e12b2-b6c9-4155-95e1-3b3b4da07277%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Looking for a job
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+unsubscribe@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/23ee33c5-e921-4ff9-a5e4-612eef81fc41%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Protecting user privacy with CanCan
to protect privacy between users.
Say I have the following three users:
Alice
Bob
Charlie
Alice is an admin and should be able manage everything. Bob and Charlie
are regular users and should be prevented from getting the index of
users, and only be able to manage their own record. For example Bob
should not be able to directly access any information about Charlie nor
Alice.
class Ability
include CanCan::Ability
def initialize(user)
user ||= User.new # guest user (not logged in)
if user.admin?
can :manage, :all
else
can :read, :all
end
end
end
Obviously these "default" abilities are not sufficient. Anyone could get
the "index" of users or the "show" of any user. I need to restrict
non-admins to the "show", "edit" & "update" of themselves, but have no
access to anyone else.
I'm just not sure how to define these abilities.
--
Posted via http://www.ruby-forum.com/.
--
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+unsubscribe@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/9a5d2ef53e344f2ebcf981893ac2d468%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Lat/Lng boudaries for each reverse geocoded address for google
On Jul 31, 2013, at 7:06 AM, Ajit Teli <lists@ruby-forum.com> wrote:
> Hi,
>
> I would like to get the lat/long boundaries for each reverse Geo-coded
> address. For example,
>
> Lat: 14.32826, Lng: 77.643127 pair gives reverse Geo-coded address as
> "Kanyakumari Road, Andhra Pradesh 515101, India". There will be list of
> other lat/long pairs which will produce same reverse Geo-coded address
> as above. And I assume that for each reverse Geo-coded address there
> will be lat/long boundary.
>
> So, please let me know how can I get lat/long boundaryies for a pair
> of lat/long which will produce same reverse Geo-coded address.
>
> Thank You
> Ajit
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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+unsubscribe@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/ae48dd0985cdb4cb8ee0a82afaef961d%40ruby-forum.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
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+unsubscribe@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/0400BF1C-3C54-4B57-805F-568C390933B7%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Proper rails deployment steps to DirectAdmin (or any hosting not focusing in apps) hosted server?
> With PHP applications (only experience I had before), all I needed to do is to FTP all required files, create MySQL username/pass & upload SQL structure, add this username/pass in any given config file of the php script and the app worked.
Yes, deploying PHP is quite simple compared to Rails.
> Can you tell me what are standard/proper steps required to deploy an app that I worked on my local Ubuntu machine and want to have it working on 'standard' web hosting company that does not specialize in Rails app hosting?
I don't have anything written (which I should) but just googling around, here's a few:
* http://blog.sudobits.com/2013/01/07/how-to-deploy-rails-application-to-vps/
* http://rubysource.com/deploying-a-rails-application/
* http://tommy.chheng.com/2013/01/23/deploying-a-rails-app-on-nginxpuma-with-capistrano/
There's also a pragprog book: http://pragprog.com/book/cbdepra/deploying-rails which I haven't read.
If you hosting solution does not offer shell access, it's going to be very difficult, I think to do an effective deploy. Even moreso if your application requires gems that need to have native extensions compiled.
There are some great Rails-hosting PaaS out there: heroku, EngineYard, CloudFront, etc.
My most recent job, we used AWS to host our app, and deployed using Chef (opscode.com) which was really nice to work with.
--
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+unsubscribe@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/693B196C-FC17-453D-8703-206D63FC2DE6%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: Proper rails deployment steps to DirectAdmin (or any hosting not focusing in apps) hosted server?
> What is most popular way to deploy apps on non-Heroku machine that has
> standard Apache/MySQL setup?
One option: http://www.capistranorb.com/
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
--
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+unsubscribe@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/CACmC4yAEhurnsFcVUD2dCowP3N%2BiyPac88VeKkp239eSZurTVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Proper rails deployment steps to DirectAdmin (or any hosting not focusing in apps) hosted server?
On Wednesday, July 31, 2013 4:06:05 AM UTC-4, Frederick Cheung wrote:
On Monday, July 29, 2013 2:53:42 PM UTC+1, southi...@gmail.com wrote:--
> Hi,
>
> With PHP applications (only experience I had before), all I needed to do is to FTP all required files, create MySQL username/pass & upload SQL structure, add this username/pass in any given config file of the php script and the app worked.
>
> Can you tell me what are standard/proper steps required to deploy an app that I worked on my local Ubuntu machine and want to have it working on 'standard' web hosting company that does not specialize in Rails app hosting?
>
While there are many ways of deploying rails applications, it's extremely unlikely that a non rails specialist will have installed/configured any of them. If you're looking for an easy way to deploy a rails app, it's hard to beat heroku for simplicity.
Fred
> Thanks,
>
> Rob
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+unsubscribe@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/5734b792-eb1e-427b-9dc6-9805bc678ddd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Planning an application - what is the optimal MVC setup?
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+unsubscribe@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/76c65b00-0a69-4a11-93a3-c4d819609f84%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Remember me (Devise) not working for me.
On Tuesday, July 30, 2013 1:18:16 PM UTC+5:30, Fahim Patel wrote:
Hi all,--I have setup all the devise configuration. But facing issue in remember me.I check remember me checkbox before sign in and I can see cookie is created and user table is also get updated .But when I logout no sign in detail is present in email and password input box , and cookie also get destroyed.I uncomment below line code also -# The time the user will be remembered without asking for credentials again.config.remember_for = 2.weeksThanks for help.Best RegardsFahim Babar Patel
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+unsubscribe@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/4fc4dad4-c51e-456b-ad4d-ad6a3ed887cf%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] error while saving cache.
I get the following error
--
Started GET "/" for 127.0.0.1 at 2013-07-31 11:01:25 -0400
Processing by HomeController#index as */*
Rendered home/index.html.haml within layouts/application (85.0ms)
Warning. Error encountered while saving cache 86b3fe7c2060008df4ecf7c83b1194891f643520/application.css.sassc: can't dump anonymous class #<Class:0x4f
1392c5>
/home/ravi/.rbenv/versions/jruby-1.7.4/lib/ruby/gems/shared/gems/sprockets-2.10.0/lib/sprockets/context.rb:282 warning: singleton on non-persistent J
ava type Java::JavaLang::InternalError (http://wiki.jruby.org/Persistence)
Completed 500 Internal Server Error in 30082ms
--
* I've tried wiping everything from the tmp/ directory
* I've tried setting config.sass.cache = false in my environment files
Nothing has worked. I keep getting this error.
Using:
* jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on OpenJDK 64-Bit Server VM 1.7.0_40-b31 +indy [linux-amd64]
* rbenv for everything else
** Sass 3.2.10 (Media Mark)
** sass-rails 4.0.0
** Rails 4.0.0
How do I fix this? I just want to turn caching off and move on with my development.
TIA
-ravi
--
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+unsubscribe@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/627adc06-3ab1-4515-852f-2fc8d252eb24%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Ruby 3 How to get username and password from Ruby app DB and post them to Joomla admin login
I have a model in my RoR app. Two of the attributes of this model is username and password, which are the login details of an already installed Joomla site. I would like to use a form in RoR app and when the user click on the submit button to get these details from my app and post them to Joomla login form and submit to login to Joomla backend. I am searching about the method i should use. If i have to use Javascript, which is the way to do it?
I have some knowledge in RoR but never done something like this before.
Thank you very much, in advance.
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+unsubscribe@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/3394f62c-7855-4df5-9ab0-790dd1df4bda%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Remember me (Devise) not working for me.
- Did Save password prompt which come after successful sign in is default feature of browser or is effect of rememberable feature ?
- How does remember me work than ?
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+unsubscribe@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/b67e5080-baa4-4a88-8d3f-08d1997c9824%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Lat/Lng boudaries for each reverse geocoded address for google
> Hi,
>
> I would like to get the lat/long boundaries for each reverse Geo-coded
> address. For example,
>
> Lat: 14.32826, Lng: 77.643127 pair gives reverse Geo-coded address as
> "Kanyakumari Road, Andhra Pradesh 515101, India". There will be list of
> other lat/long pairs which will produce same reverse Geo-coded address
> as above. And I assume that for each reverse Geo-coded address there
> will be lat/long boundary.
Why would you assume this? Latitude and longitude describe a precise
point (within the tolerance provided by the system). Addresses
(especially as defined by the Google Maps API) are imprecise. For
example "Georgia" is a valid address, as defined by Google Maps. It is
also an ambiguous address. Does it mean the United States state of
Georgia or the country in Asia? The API provides for region biasing to
disambiguate such addresses.
It would be impractical to provide a list of all Lat/Lon pairs for an
address. Theoretically that would be an infinitely long list. That is
like asking to list every point inside a rectangle. That would also
result in an infinitely long list.
Reverse geocoding a point into an address is a lot more "fuzzy." Google
Maps attempts to provide reasonable results by retuning the "best"
address for a given point, along with other addresses within the region
surrounding the given point. Unlike geo-points, addresses are finite.
There are only a limited number of them within any given region.
> So, please let me know how can I get lat/long boundaryies for a pair
> of lat/long which will produce same reverse Geo-coded address.
Taking a quick look at the Google Maps API I didn't see anything that
would directly give you what you want. As I described above I don't even
think this makes sense.
--
Posted via http://www.ruby-forum.com/.
--
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+unsubscribe@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/8ea13f724683b1e444168f1d5860ec56%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Lat/Lng boudaries for each reverse geocoded address for google
I would like to get the lat/long boundaries for each reverse Geo-coded
address. For example,
Lat: 14.32826, Lng: 77.643127 pair gives reverse Geo-coded address as
"Kanyakumari Road, Andhra Pradesh 515101, India". There will be list of
other lat/long pairs which will produce same reverse Geo-coded address
as above. And I assume that for each reverse Geo-coded address there
will be lat/long boundary.
So, please let me know how can I get lat/long boundaryies for a pair
of lat/long which will produce same reverse Geo-coded address.
Thank You
Ajit
--
Posted via http://www.ruby-forum.com/.
--
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+unsubscribe@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/ae48dd0985cdb4cb8ee0a82afaef961d%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Need suggestion on best gems for Versioning and Extending a model.
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+unsubscribe@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/976f43f7-2a7b-49c9-bc72-dbd9c5b7424a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Proper rails deployment steps to DirectAdmin (or any hosting not focusing in apps) hosted server?
> Hi,
>
> With PHP applications (only experience I had before), all I needed to do is to FTP all required files, create MySQL username/pass & upload SQL structure, add this username/pass in any given config file of the php script and the app worked.
>
> Can you tell me what are standard/proper steps required to deploy an app that I worked on my local Ubuntu machine and want to have it working on 'standard' web hosting company that does not specialize in Rails app hosting?
>
While there are many ways of deploying rails applications, it's extremely unlikely that a non rails specialist will have installed/configured any of them. If you're looking for an easy way to deploy a rails app, it's hard to beat heroku for simplicity.
Fred
> Thanks,
>
> Rob
--
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+unsubscribe@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/f751d1e8-38ef-408b-9071-774a77634836%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Multithreading problem, uninitialized constant in rake
> Hi everyone,
>
>
>
> I am having a problem with running rake tasks that involve threads.
>
> Everytime I run it, I get an uninitialized constant with one of my
>
> models (changes models occasionally) seems to be uninitialized.
>
>
>
> I have tried to fix this by adding config.threadsafe! in the
>
> application.rb. That did not work. So I tried to add
>
> Rails.application.eager.load! and that did not work. I have tried to put
>
> config.dependency_loading = true if $rails_rake_task but that does not
>
> work. I have tried config.threadsafe! unless $rails_rake_task but that
>
> did not work also.
>
>
Loading classes is inherently a thread unsafe task - you run into all sorts of race conditions. While rails has mechanisms for loading all code upfront (it does that in production by default), and this is one of the things that config.threadsafe! does. My recollection is that this disabled for rake tasks though - I don't recall the precise reasons though. If all else fails, you could use require_dependency to load all of the classes you'll need ahead of time.
Fred.
>
> I was wondering if anyone has come across this problem in which you are
>
> using threads in a rake file and you get the uninitialized constant on
>
> one of your models. Please help! I went through all the
>
> stackoverflow pages related to this and nothing works :( I have ruby
>
> 1.9.3-p429, rails 3.2.13, rubygem 2.0.6
>
>
>
> --
>
> Posted via http://www.ruby-forum.com/.
--
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+unsubscribe@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/2cd63ede-868f-4af5-b00a-99a77c72faf5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Tuesday, July 30, 2013
[Rails] Re: Remember me (Devise) not working for me.
- Did Save password prompt which come after successful sign in is default feature of browser or is effect of rememberable feature ?
- How does remember me work than ?
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+unsubscribe@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/682f770a-0989-40aa-9121-a569646cd9bf%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Remember me (Devise) not working for me.
On Tuesday, July 30, 2013 1:18:16 PM UTC+5:30, Fahim Patel wrote:
Hi all,--I have setup all the devise configuration. But facing issue in remember me.I check remember me checkbox before sign in and I can see cookie is created and user table is also get updated .But when I logout no sign in detail is present in email and password input box , and cookie also get destroyed.I uncomment below line code also -# The time the user will be remembered without asking for credentials again.config.remember_for = 2.weeksThanks for help.Best RegardsFahim Babar Patel
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+unsubscribe@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/91673ade-b854-4cbe-a4ec-61c98a9b4f84%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Multithreading problem, uninitialized constant in rake
I am having a problem with running rake tasks that involve threads.
Everytime I run it, I get an uninitialized constant with one of my
models (changes models occasionally) seems to be uninitialized.
I have tried to fix this by adding config.threadsafe! in the
application.rb. That did not work. So I tried to add
Rails.application.eager.load! and that did not work. I have tried to put
config.dependency_loading = true if $rails_rake_task but that does not
work. I have tried config.threadsafe! unless $rails_rake_task but that
did not work also.
I was wondering if anyone has come across this problem in which you are
using threads in a rake file and you get the uninitialized constant on
one of your models. Please help! I went through all the
stackoverflow pages related to this and nothing works :( I have ruby
1.9.3-p429, rails 3.2.13, rubygem 2.0.6
--
Posted via http://www.ruby-forum.com/.
--
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+unsubscribe@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/a547c1c61bc0631fe94f9a76b320446a%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Expose JavaScript partial to global namespace and call it?
Hi All,
I'm making a Rails app in which users have folders in which to organize
journal entries. I'm trying to load a partial into view that displays
D3.js visualizations based on the character count of each journal entry.
The JavaScript code and HTML inject properly, but I don't think the JS
is executing.
Show.js.erb looks like this:
$("#actual-right").append( "<%=j render :partial => 'contents', :locals
=> {:folder => @folder } %>" );
$("#jscripts").append("<%=j render :partial => 'show', formats: :js,
:locals => {:folder => @folder} %>");
The second line appends _show.js.erb with the rest of my JavaScript in
application.html.erb. The top line appends some HTML tags for D3.
I need to figure out how to execute the JavaScript so when a user clicks
the link to one of their folders, the HTML and JS are injected and the
graphs are drawn. Attached is my _show.js.erb file -- I have tried
wrapping all the D3 code in a function and calling it at the bottom, but
that didn't work.
Any advice would be appreciated!
Attachments:
http://www.ruby-forum.com/attachment/8638/_show.js.erb
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+unsubscribe@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/bfc4a034-f05d-48b5-a0ba-0146e5bf6935%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Remember me (Devise) not working for me.
On Tuesday, July 30, 2013 2:48:16 AM UTC-5, Fahim Patel wrote:
Hi all,I have setup all the devise configuration. But facing issue in remember me.I check remember me checkbox before sign in and I can see cookie is created and user table is also get updated .But when I logout no sign in detail is present in email and password input box , and cookie also get destroyed.I uncomment below line code also -# The time the user will be remembered without asking for credentials again.config.remember_for = 2.weeksThanks for help.Best RegardsFahim Babar Patel
# Rememberable manages generating and clearing token for remember the user# from a saved cookie. Rememberable also has utility methods for dealing# with serializing the user into the cookie and back from the cookie, trying# to lookup the record based on the saved information.# You probably wouldn't use rememberable methods directly, they are used# mostly internally for handling the remember token.## == Options## Rememberable adds the following options in devise_for:## * +remember_for+: the time you want the user will be remembered without# asking for credentials. After this time the user will be blocked and# will have to enter his credentials again. This configuration is also# used to calculate the expires time for the cookie created to remember# the user. By default remember_for is 2.weeks.
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+unsubscribe@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/f918e5f4-e63b-4ae7-9b90-75d463fccd34%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] [JOB] Rails Developer - Greenwich, CT to 130k
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+unsubscribe@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/9cefab78-cfc2-46ee-9ba3-371171b6c2bd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Re: pass name and values in link_tag
On Monday, 29 July 2013 11:01:32 UTC-4, kanna wrote:hi i passed name and value in link_to but its not taking?
<%if params[:deals][:company_name] !=nil && params[:deals][:company_name] == "dsec" %>
<%= link_to "Company Name d","javascript:void(0)",:class=>"get_page decending",:name=>"deals[company_name]",:value=>"asc","data-url"=>"1","data-searchurl"=>"/deals/search" %>
<%elsif params[:deals][:company_name] !=nil && params[:deals][:company_name] == "asc"%>
<%= link_to "Company Name a","javascript:void(0)",:class=>"get_page ascending",:name=>"deals[company_name]",:value=>"dsec","data-url"=>"1","data-searchurl"=>"/deals/search" %>
<%else%>
<%= link_to "Company Name n","javascript:void(0)",:class=>"get_page",:name=>"deals[company_name]",:value=>"dsec","data-url"=>"1","data-searchurl"=>"/deals/search" %>
<%end%>
in browser
<a class="get_page" value="dsec" name="deals[company_name]" data-url="1" data-searchurl="/deals/search" href="javascript:void(0)">Company Name n</a>
The values appear in the link tag, just as you requested. Perhaps you're intending to pass them as parameters to /deals/search somehow?To help people answer this question, you should include the Javascript code that's reading data-url and data-searchurl so that it can be determined exactly what that code is looking for...--Matt JonesPS: multiple-posting your question is not generally considered a useful way to produce answers faster. :)--To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/70695f1e-5ed4-469d-a2e4-d4af66b5a943%40googlegroups.com.
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
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+unsubscribe@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/CAPtiWRBEek1hG3do3s8bzj%3DcN5_2C%2Bx4D5OQ0FWMCzyztv%2BErw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: pass name and values in link_tag
On Monday, 29 July 2013 11:01:32 UTC-4, kanna wrote:
hi i passed name and value in link_to but its not taking?
<%if params[:deals][:company_name] !=nil && params[:deals][:company_name] == "dsec" %>
<%= link_to "Company Name d","javascript:void(0)",:class=>"get_page decending",:name=>"deals[ company_name]",:value=>"asc"," data-url"=>"1","data- searchurl"=>"/deals/search" %>
<%elsif params[:deals][:company_name] !=nil && params[:deals][:company_name] == "asc"%>
<%= link_to "Company Name a","javascript:void(0)",:class=>"get_page ascending",:name=>"deals[ company_name]",:value=>"dsec", "data-url"=>"1","data- searchurl"=>"/deals/search" %>
<%else%>
<%= link_to "Company Name n","javascript:void(0)",:class=>"get_page",:name=>" deals[company_name]",:value=>" dsec","data-url"=>"1","data- searchurl"=>"/deals/search" %>
<%end%>
in browser
<a class="get_page" value="dsec" name="deals[company_ data-url="1" data-name]" searchurl="/deals/search" href="javascript:void(0)"> Company Name n</a>
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+unsubscribe@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/70695f1e-5ed4-469d-a2e4-d4af66b5a943%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] How to include & combine all controller specific javascript in rails?
Originally posted here
I am using Rails 3.2.1 where I have to include few controller and action specific javascripts which I am doing using a javascript_template_manager.html.haml and calling this at the bottom of the page. Now I want to combine all these js into one to reduce the http request. I am using asset pipeline.
How can I combine controller specific js into one precompiled file?
Here is how my _javascript_template_manager.html.haml file looks like:
%noscript :css #container{ display:none; } = render :partial => "/widgets/common/javascript_disabled" = jquery_include_tag :google = javascript_include_tag "common" / condetional javascripts for the app - if params[:controller] == "settings" = javascript_include_tag "plugins/jQuery-cookie" - if params[:controller] != "people" and params[:controller] != "companies" = javascript_include_tag "plugins/iphone-style-checkboxes" - if params[:controller] == 'users' || params[:controller] == 'companies' = javascript_include_tag "plugins/best_in_place" - if params[:controller] == 'letters' || params[:controller] == 'companies' = javascript_include_tag "plugins/jquery.autoSuggest" - if params[:controller] == 'people' || params[:controller] == 'letters' || params[:controller] == 'users' || params[:controller] == 'companies' = javascript_include_tag "plugins/areacomplete" = javascript_include_tag "application"Now I want to combine all the above javascript files into one or what is the best way to do it?
- deepak
--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+unsubscribe@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/efe2a576-db41-459e-9462-4cb358e33799%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] How to test a controller mapped to a non-canonical path?
`/super-power`, and not the canonical `/super_power` (notice the hyphen
instead of the underscore).
In my `routes.rb` I have
resources 'super-power', as :super_power
My `super_power_test.rb` contains
class SuperPowerControllerTest < ActionController::TestCase
test "shows all available" do
get :index
assert_not_nil assign(:powers)
end
end
and the test fails with
# Running tests:
[1/1] SuperPowerControllerTest#test_shows_all_available = 0.08 s
1) Error:
test_shows_all_available(SuperPowerControllerTest):
ActionController::RoutingError: No route matches
{:controller=>"super_power"}
The test fails because it doesn't use the correct path `/super-power`
but uses the canonical `/super_power`.
Is there a way to associate the tests of a controller to a certain path?
Is there a way to make this change for all the tests?
--
Gioele Barabucci <gioele@svario.it>
--
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+unsubscribe@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/kt8f3p%24lu1%241%40ger.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Remember me (Devise) not working for me.
On Tuesday, July 30, 2013 1:18:16 PM UTC+5:30, Fahim Patel wrote:
Hi all,I have setup all the devise configuration. But facing issue in remember me.I check remember me checkbox before sign in and I can see cookie is created and user table is also get updated .But when I logout no sign in detail is present in email and password input box , and cookie also get destroyed.I uncomment below line code also -# The time the user will be remembered without asking for credentials again.config.remember_for = 2.weeksThanks for help.Best RegardsFahim Babar Patel
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+unsubscribe@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/57c09ee7-aafd-4494-b5b8-e55b4855c0b9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Remember me (Devise) not working for me.
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+unsubscribe@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/c3fe493d-963e-4bda-a1f0-1dc76ade2b60%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.