/bin/rm: Argument list too long tmp/sessions/ruby_sess.*
Well this happens when there are too many files to process:
Best way in this case is to do batch processing:
Sample command:
find . -name 'ruby_sess.*' -print0 | xargs -0 rm
Well this happens when there are too many files to process:
Best way in this case is to do batch processing:
Sample command:
find . -name 'ruby_sess.*' -print0 | xargs -0 rm
RAILS_ROOT gives you relative path within the applications it works fine as far as you need the path within rails application.
How about getting absolute path to rails folder?
I found one way, and thats from the ENV hash.
You can use ENV[’PWD’] to find absolute path to the rails folder.
Any other ways ??
*Update 4th Oct 2007*
Dir.pwd is a better way
page.redirect_to :action => ‘thanks’, :p1 => @g_resp.params[”_code”], :p2 => @r_id
Problem:
Fix:
I got this error today while deploying rails application on running lighttpd server.
Errno::ENOENT (No such file or directory - getcwd)
I replaced application directory without stopping lighty and got error while trying accessing app via browser.
I went off by merely restarting lighthttpd
Seems like server creates/uses some file “within” rails app folder which got erased while replacing the folder.
Its a piece of cake developing applications that run on multitude of Database management solutions.
All you need to keep Database schema scripts handy. Here is how you do it using rails scripts:
This will create an empty file in db/migrate folder for contact table. You need to fill it now with the fields you want
for eg:
Ok.. just found what I was looking for. Pretty detailed document for this: http://rubyonrails.org/api/classes/ActiveRecord/Migration.html
Now, apply the migration
Now, generate model and controller for Contact
Ok Lets try ruby on rails, lots of hype around.
First of all followed the link, and did as said here
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html
Hour 2
Ruby installed, rails installed. But not working with mysql. I am getting lost connection problem everytime I try to run the application.
Hour 3
Mysql Lost connection problem is solved by copying mysql.so from the rar file I got from following link
http://wiki.rubyonrails.org/rails/pages/HowToUseMySQLRubyBindingsOnWin32/versions/28
OR try this one: I havent tried it though
http://seagecko.org/thoughts/in-the-past/2004/09/09/ruby-mysql-and-windows/
Just copied mysql.so in #path-to-ruby#\lib\ruby\site_ruby\1.8\i386-msvcrt, restarted webserver, and it worked. Didnt Used other dlls in rar, dont think i need in my case. I am using 4.1.9-nt version of mysql
Powered by WordPress