Re: [Rails] cannot connect to local host

2014-07-14 Thread Colin Law
On 13 July 2014 23:03, Fatima Fatima li...@ruby-forum.com wrote: I made a mistake last time and shut down my RoR project without pushing to git or anything. I just tried to log back in and I can't connect to the local when I start rails server. This is the error I'm getting - I tried to

Re: [Rails] Updating Rails 2 to Rails 3 or 4

2014-07-14 Thread tonypm
Rob, this is a useful summary, Thanks. I face the same problem, having two large apps that are in constant development and so without putting a stop to development and focusing on upgrading (something that would be very hard to sell to one of my clients), I am strugling to see a way forward.

[Rails] Upload UTF-8 encoded textfile

2014-07-14 Thread Ronald Fischer
My Rails application (Rails 4.1, Ruby 2.1.1) offers the user to upload a file. This file will then be parsed by the application, and after the parsing is done, it is deleted from the upload area. So far, I have the following: In my upload form, I have %= file_field_tag :upload, {accept:

[Rails] Validation in a 3-level association

2014-07-14 Thread Ronald Fischer
I have 3 models, say A, B and C, and they are set up like this: A: has_many :Bs has_many :Cs, through: B B: belongs_to A: has_many :Cs C: belongs_to B: In my model for C, I want to declare, that a column ccol within C must be unique, but only within the scope of a certain A. If the

Re: [Rails] Updating Rails 2 to Rails 3 or 4

2014-07-14 Thread Walter Lee Davis
On Jul 14, 2014, at 6:46 AM, tonypm wrote: I am also using Prototype js, and am wondering whether I should migrate to JQuery along the way, or get as far as possible with Prototype. I am still using Prototype in 4.1, this branch is the one that works without issues for me:

[Rails] Unobtrusive Javascript in rails 4

2014-07-14 Thread markt
Hello I'm new in using Ruby on rails, and I was wondering how I can use Javascript in rails 4. I searched this topic a lot on google and I found RailsCasts - #205 Unobtrusive Javascript. Is there any good books on this topic? do you know any great links where I can find more on this topic?

[Rails] Re: cannot connect to local host

2014-07-14 Thread Rasool SB
Hi, Have you try deleting the Gemfile.lock and then run bundle install and then finally rails s.. hope this will help you.. :) On Monday, 14 July 2014 03:34:39 UTC+5:30, Ruby-Forum.com User wrote: I made a mistake last time and shut down my RoR project without pushing to git or

[Rails] Re: Unobtrusive Javascript in rails 4

2014-07-14 Thread Frederick Cheung
On Monday, July 14, 2014 3:00:45 PM UTC+1, markt wrote: Hello I'm new in using Ruby on rails, and I was wondering how I can use Javascript in rails 4. I searched this topic a lot on google and I found RailsCasts - #205 Unobtrusive Javascript. Is there any good books on this topic? do

Re: [Rails] Re: cannot connect to local host

2014-07-14 Thread Colin Law
On 14 July 2014 13:14, Rasool SB rasool...@gmail.com wrote: Hi, Have you try deleting the Gemfile.lock and then run bundle install and then finally rails s.. hope this will help you.. Why delete Gemfile.lock when the system was previously working? Gemfile.lock is what ensures the same

Re: [Rails] cannot connect to local host

2014-07-14 Thread Hassan Schroeder
On Sun, Jul 13, 2014 at 3:03 PM, Fatima Fatima li...@ruby-forum.com wrote: I made a mistake last time and shut down my RoR project without pushing to git or anything. That sentence doesn't really make sense. Are you using git at all? If so, stash your changes and check out the last known

[Rails] Re: cannot connect to local host

2014-07-14 Thread Fatima Fatima
Thanks for the help Rasool, Colin and Hassan. 1. I get this error whenever I start rails server - nothing will connect to local host to show me errors/the site. a. This means I can't run rake routes - my rake commands are always aborted and I get the same error message pasted above. I

[Rails] require 'dl' doesn't work

2014-07-14 Thread Liz Huang
In Ruby 1.8.7 and Rails 2.3.18, I used Dl.dlopen to load intel fortran dll like the following require 'dl' ... sspath = Pathname.new( .../lib/libsamplesize.dylib ) ss = DL.dlopen( sspath ) samplesize = ss[ samplesize_, iiddS ] session[:n], args = samplesize[

Re: [Rails] Re: cannot connect to local host

2014-07-14 Thread Hassan Schroeder
On Mon, Jul 14, 2014 at 8:19 AM, Fatima Fatima li...@ruby-forum.com wrote: 1. I get this error whenever I start rails server - nothing will connect to local host to show me errors/the site. Irrelevant - the error messages are in your console/logs. a. This means I can't run rake routes

[Rails] Re: cannot connect to local host

2014-07-14 Thread Rasool SB
Gemfile.lock is a list of gems used to ensure that all copies of the app use the same gem versions *, *When ever we accidentally shutdown, Rails or Ruby files( temporary files) like /tmp/pids/server.pid and or Gemfile.lock caches logs to interact with some methods, classes etc., due to

[Rails] Re: require 'dl' doesn't work

2014-07-14 Thread Liz Huang
I am using Ruby 2.1.0 and Rails 4.1.2 now, and 'dl' no longer works? Liz On Monday, July 14, 2014 11:32:51 AM UTC-4, Liz Huang wrote: In Ruby 1.8.7 and Rails 2.3.18, I used Dl.dlopen to load intel fortran dll like the following require 'dl' ... sspath = Pathname.new(

Re: [Rails] Re: cannot connect to local host

2014-07-14 Thread Hassan Schroeder
On Mon, Jul 14, 2014 at 9:06 AM, Rasool SB rasool...@gmail.com wrote: When ever we accidentally shutdown, Rails or Ruby files( temporary files) like /tmp/pids/server.pid and or Gemfile.lock caches logs to interact with some methods, classes etc., due to sudden close of the application

[Rails] Re: cannot connect to local host

2014-07-14 Thread Fatima Fatima
Thanks for the suggestions all. I'm going to play around using the feedback and let you know what I come to. -- 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

Re: [Rails] Re: cannot connect to local host

2014-07-14 Thread Eric Saupe
Hassan is right. I doubt the problem is with your Gemfile.lock so I suggest starting elsewhere and leaving it alone. The best thing would be to stash your changes using git and going back to a working version of the application. Go back to the last version that worked and see what's different.

[Rails] Re: Upload UTF-8 encoded textfile

2014-07-14 Thread Eric Saupe
Maybe try this? http://stackoverflow.com/questions/5163339/write-and-read-a-file-with-utf-8-encoding Does it matter if every file is considered UTF-8 even if it never contains a UTF-8 character? On Monday, July 14, 2014 5:01:11 AM UTC-6, Ruby-Forum.com User wrote: My Rails application (Rails

[Rails] Re: layout rendering problem

2014-07-14 Thread Eric Saupe
Because you have /layouts inside of /welcome it would need to be %= render 'welcome/layouts/login' % and I think you'll also need an underscore before login.html.haml to make it _login.html.haml because it's a partial. On Sunday, July 13, 2014 5:45:39 AM UTC-6, Roelof Wobben wrote: Hello,

[Rails] Re: cannot connect to local host

2014-07-14 Thread Fatima Fatima
Thanks Eric - will try that! -- 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

[Rails] Re: require 'dl' doesn't work

2014-07-14 Thread Joel Pearson
That's a very short error message. What did the rest of the error say? -- 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

[Rails] Re: layout rendering problem

2014-07-14 Thread Roelof Wobben
Thanks, I will work on this idea. Op maandag 14 juli 2014 19:43:31 UTC+2 schreef Eric Saupe: Because you have /layouts inside of /welcome it would need to be %= render 'welcome/layouts/login' % and I think you'll also need an underscore before login.html.haml to make it _login.html.haml

[Rails] how to make this form

2014-07-14 Thread Roelof Wobben
Hello, I have read several pages but I cannot find how to make a form with this field ; div class=field label for=Login naam Login naam:/label input type=text id=firstname name=firstname value= placeholder=login naam class=login / /div

[Rails] Re: require 'dl' doesn't work

2014-07-14 Thread Liz Huang
I don't see anything else though, let me copy the whole page: LoadError in SamplesizeController#compute cannot load such file -- dl Extracted source (around line *#14*): 121314151617 def compute require 'dl' require 'pathname' #if ( session[:sigma_sq] = 0.0 )

[Rails] Re: Tricky Inheritence

2014-07-14 Thread Masc Prem
Hi Matt, Schema looks like this. sqlite .schema transaction_items CREATE TABLE transaction_items (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, transaction_type_id integer, note varchar(255), transaction_date datetime, created_at datetime, updated_at datetime); sqlite .schema

Re: [Rails] Validation in a 3-level association

2014-07-14 Thread Hassan Schroeder
On Mon, Jul 14, 2014 at 6:07 AM, Ronald Fischer li...@ruby-forum.com wrote: I have 3 models, say A, B and C, and they are set up like this: A: has_many :Bs has_many :Cs, through: B In my model for C, I want to declare, that a column ccol within C must be unique, but only within the

[Rails] Re: cannot connect to local host

2014-07-14 Thread Ebrahim Pasbani
You should check the file mentioned in the first line of stacktrace or show it to us -- 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

[Rails] Re: how to make this form

2014-07-14 Thread Eric Saupe
%= form_for @user do |f| % div class=field %= f.label :login_naam %: %= f.text_field :login_naam, class: login, placeholder: login naam %br / /div %= f.submit % % end % You'll want to let Rails take care of the id's so they can match up the label with the field automatically as

[Rails] Re: Tricky Inheritence

2014-07-14 Thread Masc Prem
I have uploaded the source code of model and migration at below link. https://drive.google.com/file/d/0B6uWxuw822j9c1Z1X2F2eGxCclU/edit?usp=sharing Anyone can create simple rails application, copy model migration files on place. Run rails console and execute below commands to reproduce error.