Most of "multi-platform" CI tools I've seen are in the Java/.NET world, like TeamCity or Hudson. Is there a continuous integration tool that can handle both PHP and Rails projects?
I have a simple class that is using curb to retrieve data. Everything works just find from the command line, but when I load it into my rails application WebBrick crashes on the "require 'curb'" statement.
I'm extremely new to ruby so I'm not sure how exactly to debug the error from webbrick to determine what is wrong.
If someone knows how to solve this issue that would be great, if someone could also point me into the right direction to start troubleshooting the issue myself that would also help.
Hi! I am looking for method for parsing route path like this:
ActionController::Routing.new("post_path").parse
#=> {:controller => "posts", :action => "index"}
It should be opposite to url_for
Upd
I've found out:
http://stackoverflow.com/questions/2222522/what-is-the-opposite-of-url-for-in-rails-a-function-that-takes-a-path-and-genera
ActionController::Routing::Routes.recognize_path("/posts")
So now I need to convert posts_path into "/posts"
I am working with Rails 2.2.
The required behaviour is as follows:
I have a link(with a ajax link embedded)
xyz.com/admin#page1
When I go to the above page, I should be redirected to the login page, if I am not logged in.
After I log in, I should be taken back to
xyz.com/admin#page1
For this I need to store the url in session when I visit any page.
The problem is that when I do request.uri, I get
xyz.com/admin
But I want to store
xyz.com/admin#page1
Regards,
Pankaj
In my rails app I have defined the routes so users can access records like http://mydomain.com/qwe2
But if they type a wrong "qwe2" they get a 500 page. I think a 404 would be more appropriate.
How can I change the error page that is shown? Thanks
i'm looking for a rails plugin for open id authentication.
I'm using restful-authentication
Can you tip me any plugin?
Do you know any tutorials for using these plugins?
thanks
Hi Everyone,
A follow on from this questions:
http://stackoverflow.com/questions/3032598/rails-created-at-on-display-if-today
Is it possible to output the word TODAY rather than the date when using the following helper?
def created_today k
k.created_at if k.created_at.to_date == Date.today
end
<%=h created_today(k) %>
Thanks,
Danny
Rails defines a bunch of magic with named routes that make helpers for your routes. Sometimes, especially with nested routes, it can get a little confusing to keep track of what URL you'll get for a given route helper method call. Is it possible to, using the Ruby console, see what link a given helper function will generate? For example, given a named helper like post_path(post) I want to see what URL is generated.
When I execute a Rails unit test from the command line (as suggested here) such as
ruby unit/test_model.rb
...I get this error:
No such file or directory - .../test/config/database.yml (Errno::ENOENT)
Am I doing something wrong? Or is there a workaround?
How do I configure Ruby on Rails to output standard HTML code instead of XHTML when using helpers (form, javascript, css, etc.)?
I don't want to have the slash at the end:
<input name="email" type="text" />
Hi All,
I am trying to integrate restful_authentication plugings into my rails 3 application. I integrated this in windows, but while trying to integrate it to ubuntu I am facing an error "uninitialized constant OpenSSL::Digest::SHA1"
I googled for the solution but still unsuccessful. I am unable to load the file, "require Digest/SHA1"
Now, i tried to run console screen. and tried to check the Digest file by putting print statement, this gives false, while in the irb it returns true.
If anyone has come across such problem
[Rails] Where to put this code?
I have a user1 and when another registered user2 sees the profile of user1, has some buttons on it: ['add as friend', 'give me your number', 'give me your email', 'ask her out', 'view photos']. The 1,2,3,4 are POST, with AJAX. Now, i have to make a new controller named 'ProfileActionsController' or i should put this code in the 'UsersController'?
or maybe a another posiibility? thanks ;)
I've noticed that pagination gems like mislav-will_paginate are quite popular. Is this because Rails does not have a built-in pagination solution or because the built-in solution is not very good?
What's the best way to add foreign keys to my existing tables in Rails with an underlying MySQL database? clearly the solution should be done in a migration, as I want this versioned. Otherwise I'd create the constraints myself.
I can't seem to find one, conducive response to they above. Again, the tables have already been created with previous migrations. I'm just going back now and adding referential integrity wherever it's applicable.
In rails guides it's described like this: "Objects will be in addition destroyed if they’re associated with :dependent = :destroy, and deleted if they’re associated with :dependent = :delete_all."
Right, cool. But what's the difference between being destroyed and being deleted?
I tried both and it seems to do the same thing.
Hi, I'm trying to use paperclip in rails and when I'm doing the "bundle install" I'm getting the following error:
Can't install RMagick 2.13.1. Can't find Magick-config in /usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/seanhinton/.rvm/bin
What I'm wondering is how do I install RMagick (is that what I need?) on my machine (it's OSX 10.6)?
Cheers!
I need to push my rails code into stating environment from github. And then deploy this app into engineyard in staging environment. Could some please give me step I need follow
I running a rails project and I am displaying a textfield that can often be too long. If there any things I can call to only display 20 words or 120 characters on the the view page ??
I'm working on a rails app to integrate with infusionsoft's xmlrpc api. Does anyone have any tips or pointers for integrating a system smoothly? What are best practices? How do you best re-factor code?
Thanks for any tips / ideas
I'm using clearance (http://wiki.github.com/thoughtbot/clearance) for authentication in my rails app. But I'm trying to figure out how to grab the user's ID in a view after logging in.
Any ideas?
Background Job gets mentioned a lot but all the tutorials I've seen seem to indicate that its for queuing jobs which are created by some external event such as a user clicking "Send mail".
But what about when you have code that needs to scheduled to run every 30 seconds to listen for new messages from twitter?
Normally rake is recommended for set in stone schedules but it inst so efficient for frequent jobs as it has to to load the entire rails app each time.
Can anyone recommend anything for this situation?