[Rails] Re: Rails Deployment/Remote Access

2014-04-17 Thread yan shi
if you are using Passenger, I recommend this post http://hlcfan.logdown.com/posts/139092-deploy-rails-app-with-passenger-and-nginx and beside, did you check the difference between local and remote? 在 2014年4月16日星期三UTC+8上午7时09分20秒,Melb01写道: Hi, I developped a rails application and I wanted

[Rails] Re: Configure Restful routes for rails webservice

2014-04-17 Thread yan shi
why would you like to config the routes like: /book/book_id/new/param1/param2/param3/param4/... but not: /book/book_id/new?param1=xxparam2=xxparam3=xx ? 在 2014年4月16日星期三UTC+8下午8时39分31秒,Ruby-Forum.com User写道: Hi, I am trying to create a Rest web service in my rails application. I need to

[Rails] Re: Rails 4.1 activerecord_relation conversion to array problem

2014-04-17 Thread Rodrigo Lueneberg
Thanks, I did updated will_paginate gem and still the problem. Looks like it is not compatible with rails 4.1 The last version is of 3.0.5 September 18, 2013 (34 KB) according to the link below: https://rubygems.org/gems/will_paginate/versionsOn However, on rails 4.0.4 it works beautifully.

[Rails] RestClient::ResourceNotFound in UsersController#index

2014-04-17 Thread prabhu
Hi, I am trying to implement Rest Api for a sample application for learning purpose. But when I try to make a GET request through the RestClient it is showing error as RestClient::ResourceNotFound in UsersController#index def index uri = #{API_BASE_URL}/users.json # specifying json

[Rails] REST API routes configuation in rails

2014-04-17 Thread prabhu
Hi, I am trying to implement a web service with REST API. So when I type in the url as *localhost:3000/users/new/id/6235/name/david/age/12*, I need to access the params of id,name and age in my controller. So params[:id] = 6235 params[:name] = david params[:age]= 12 How do I achieve it with

Re: [Rails] Rails 4.1 activerecord_relation conversion to array problem

2014-04-17 Thread Walter Lee Davis
I believe Kaminari can be dropped in (uses the same verbs) and it might work for you. (Last commit was 7 days ago, if that means anything.) Walter On Apr 17, 2014, at 8:22 AM, Rodrigo Lueneberg wrote: Thanks, I did updated will_paginate gem and still the problem. Looks like it is not

[Rails] Re: Rails 4.1 activerecord_relation conversion to array problem

2014-04-17 Thread Rodrigo Lueneberg
Thanks Walter, I did not know about this gem. Walter Davis wrote in post #1143372: I believe Kaminari can be dropped in (uses the same verbs) and it might work for you. (Last commit was 7 days ago, if that means anything.) Walter -- Posted via http://www.ruby-forum.com/. -- You received

[Rails] [DEVELOPER] I search for remote job. RUBY, JS developer with 10 years experience

2014-04-17 Thread SergXIIIth
Hello, My name Sergey Makridenkov. I would like offer my Ruby, Js, Js MVC skills to help you to solve humans needs :-) I can start work today. I would like work remotely. I have about 10 years commercial programmer experience. Personal qualities - responsibility, quality, effectiveness.

[Rails] Re: Configure Restful routes for rails webservice

2014-04-17 Thread Евгений Шурмин
routes: put 'book/:id/new/*options' url: /book/34/new/1/2/foo/4/5 controller: params[:id] = 34 params[:options] = [1,2,foo,4,5] May be best way make a POST request? среда, 16 апреля 2014 г., 16:39:31 UTC+4 пользователь Ruby-Forum.com User написал: Hi, I am trying to create a Rest

[Rails] [ANN] 3T Software Labs MongoDB tools for Mongoid, MongoMapper and MongoDB users.

2014-04-17 Thread graham
Hello fair Rubyists! I’d like to announce the availability of 3T Software Labs MongoDB tools to the Mongoid and MongoMapper users (and any other MongoDB users) on this list. To forward-thinking Rubyists and MongoDB users alike, I’d like to extend a special 60-day trial of all the apps in

[Rails] Rails website is down after a server reboot

2014-04-17 Thread Ead
Hello everyone I am desperately in need of help because a website created by Ruby on Rails has gone down after remotely rebooting a VPS server. The site is this: http://offeriland.com/ I could not let update reflect in the site, so I rebooted the site using the web host's remote VPS control

Re: [Rails] REST API routes configuation in rails

2014-04-17 Thread Chris Tonkinson
the url as *localhost:3000/users/new/id/6235/name/david/age/12*, I need to access the params of id,name and age in my controller. So params[:id] = 6235 params[:name] = david params[:age]= 12 With the little context you've provided, the best I can offer is the following guess: The route:

[Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Frederick Cheung
On Thursday, April 17, 2014 3:25:38 PM UTC+1, Ead wrote: Hello everyone I am desperately in need of help because a website created by Ruby on Rails has gone down after remotely rebooting a VPS server. The site is this: http://offeriland.com/ I could not let update reflect in the site,

Re: [Rails] REST API routes configuation in rails

2014-04-17 Thread Hassan Schroeder
On Thu, Apr 17, 2014 at 6:20 AM, prabhu pradeep.achut...@gmail.com wrote: I am trying to implement a web service with REST API. I would strongly recommend that you study how the default restful routes for a Rails-scaffolded model work first. It would also be good to read up on the concept of

[Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Ead
Thank you so much for the reply. The below is the top portion of the production.log. It shows 500 Internal Server Error at the 5th line from the top. I don't understand the cause of the error because hardly anything has changed since the time before the boot. I would be every so grateful if you

Re: [Rails] REST API routes configuation in rails

2014-04-17 Thread prabhu
The url that I would enter (for testing purpose )would be like below. http://our.api.com/term/pumas/productType/clothing/color/black So the term is pumas, productType is clothing and color is black. Hope this would give you more clarity Thanks On Thursday, 17 April 2014 19:52:55 UTC+5:30,

Re: [Rails] REST API routes configuation in rails

2014-04-17 Thread prabhu
On Thursday, 17 April 2014 20:21:31 UTC+5:30, prabhu wrote: The url that I would enter (for testing purpose )would be like below. http://our.api.com/term/pumas/productType/clothing/color/black So the term is pumas, productType is clothing and color is black. Hope this would give you

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Mike Villa
New migration? Check with the last engineer who checked in code. Might need to update ur database rake db:migrate. Someone who is familiar with or db should do that. Check with ur db admin first too Sent from my iPhone On Apr 17, 2014, at 7:45 AM, Ead dai2...@gmail.com wrote: Thank you so

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Ead
Thank you for the reply. Running rake db:migrate returns the message below: rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) /home/tadashi-toyokura/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Tommaso Visconti
are you sure the app works outside the server (e.g. in your development machine)? 2014-04-17 17:12 GMT+02:00 Ead dai2...@gmail.com: Thank you for the reply. Running rake db:migrate returns the message below: rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Ead
I could only run the website from the development and production branches of the VPS server as my local machine did not have an environment that could run Ruby files. Before the reboot, the site ran perfectly from the server, so I just cannot start thinking how I could go about debugging this.

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Tommaso Visconti
Check line 16 in app/controllers/static_pages_ controller.rb, that line produces the query which causes the error. 2014-04-17 17:20 GMT+02:00 Ead dai2...@gmail.com: I could only run the website from the development and production branches of the VPS server as my local machine did not have an

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Hassan Schroeder
On Thu, Apr 17, 2014 at 7:45 AM, Ead dai2...@gmail.com wrote: hardly anything has changed since the time before the boot. Uh, hardly anything? Then you should go through each one of the hardly anythings to be sure they're not causing this. ActiveRecord::StatementInvalid (PG::Error: ERROR:

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Ead
Thank you, I appreciate the suggestion. I have checked the file under question and here's the code up to the 16th line: class StaticPagesController ApplicationController before_filter :hide_nav, only: [:forgots_password, :send_new_password, :client_forgots_password,

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Colin Law
On 17 April 2014 16:12, Ead dai2...@gmail.com wrote: Thank you for the reply. Running rake db:migrate returns the message below: rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) Were you in the correct folder when you run that. You should be in

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Dai Nish
The only change made to the production environment was an addition of a CSS class to correct the layout of a breadcrumb list, and I'm finding no difference between static_pages_controller.rb and other files. The test server is http://dev.offeriland.com:81/ being hosted in the same VPS server and

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Hassan Schroeder
On Thu, Apr 17, 2014 at 8:43 AM, Dai Nish dai2...@gmail.com wrote: I don't have a good knowledge of databases at all, so some more advice would be grateful. First piece of advice: stop top-posting, and answer the questions already asked. Are you connecting to the correct database instance?

[Rails] render hash in json format

2014-04-17 Thread prabhu
Hi, I am trying to render a has as a json format from my controller to a json template with respond_with(@user). But the json view renders it a messy. * message : {:user_id=gt;quot;10803quot;, :action_name=gt;quot;newquot;, :date=gt;quot;18-12-2015quot;, :type=gt;quot;* *GENquot;,

[Rails] rails restful routing

2014-04-17 Thread prabhu
Hi, I have a Books controller and I need to configure restful routes for API webservice.I need to set the routes for the below urls books/book_id/search books/book_id/delete books/book_id/next How do i do it -- You received this message because you are subscribed to the

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Ead
I've tried checked the database instance with Putty by running psql mydb in its terminal, but the message below was returned where xyz-abcde is the ID I entered to authenticate to the Linux server: psql: FATAL: role xyz-abcde does not exist The other engineer told me the server runs Postgres

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Ead
Thank you. I've just changed the directory to 'db', run 'rake db:migrate' to find no error, then run 'rake db:migrate RAILS_ENV=production' to reflect any possible changes to the live server, but the same error message 'We're sorry, but something went wrong' still appears.. Regards, Ead

[Rails] Social Network in RoR

2014-04-17 Thread Juan Gutiérrez Ortega
For this slide and article: https://engineering.groupon.com/2013/misc/i-tier-dismantling-the-monoliths/ http://www.slideshare.net/pcalcado/from-a-monolithic-ruby-on-rails-app-to-the-jvm - Any coment please, any experience?, - Rails or not Rails for a Social network? Thanks. J -- You

Re: [Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Ead
Apologies, the code from static_pages_controller.rb below only shows up to line 15. Line 16 reads as follows: @ordered_industries_name_hash = @user.ordered_industries_name_hash I can't understand what production.log is saying about this line... On Friday, 18 April 2014 00:38:51 UTC+9, Ead

[Rails] fields_for doesnt working

2014-04-17 Thread Juan Andres Rodriguez
I'am working on a project about a booking system for a hotel, i have the Client model and the Reservation model, the client has_many reservations and the reservation belongs_to :client. The problem si that when i want to create a new reservation, i want to be able to create a client in the

Re: [Rails] rails restful routing

2014-04-17 Thread tamouse pontiki
On Thu, Apr 17, 2014 at 4:46 PM, prabhu pradeep.achut...@gmail.com wrote: Hi, I have a Books controller and I need to configure restful routes for API webservice.I need to set the routes for the below urls books/book_id/search books/book_id/delete books/book_id/next How do

[Rails] Re: Rails website is down after a server reboot

2014-04-17 Thread Ead
It turns out that the server reboot had terminated Unicorn which failed to restart. Deleting unicorn.pid while making sure that this was not included in the processes restored the site. Best regards, Ead On Thursday, 17 April 2014 23:25:38 UTC+9, Ead wrote: Hello everyone I am desperately