Re: [Rails] Simple CMS to add a few pages to an existing site

2017-12-09 Thread Ben Edwards
Just a few pages. Not updated that often. Possibly a fee images. Think I will build it from scratch. On reflection CMS seems a bit OTT. -- 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

[Rails] Simple CMS to add a few pages to an existing site

2017-12-09 Thread Ben Edwards
I'm not having much luck with RefinaryCMS (support channel not very active) so was wondering what to try next? -- 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] Adding RefinaryCMS to existing site (devise/cancancan)

2017-12-02 Thread Ben Edwards
Hi, think the subject kind of says it all. I have an existing site (https://eventpuddle.com/) and want to use RefinaryCMS to manage pages. The app uses devise/cancancan for user managment. Be good to get some pointers as to how to do this. I have looked at

[Rails] NewRelic replacement?

2017-11-29 Thread Ben Edwards
Have a look at zabbix. -- 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+unsubscr...@googlegroups.com. To post to this group, send email

Re: [Rails] Problem with Active Query condition

2017-11-26 Thread Ben Edwards
Actualy you missed the main thisg, not saying whitch version of rails I was using. I was using old syntax for 9I think 2.3) and was using rails 5. On Tuesday, November 21, 2017 at 2:04:27 AM UTC, Hassan Schroeder wrote: > > On Mon, Nov 20, 2017 at 4:46 PM, Ben Edwards <lo...@funk

[Rails] Installing rails on Android phone - is GNURoot Debion a good option

2017-11-26 Thread Ben Edwards
I have an old HTC m9 with a slightly busted screen and I want to use it as a rails test server. I installed GNURoot Debian which gave me an almost full Linux system running within Android but it does not support users, everything is run as root.So was wondering if it was OK to run rails as

[Rails] Problem with Active Query condition

2017-11-20 Thread Ben Edwards
I have the following code for an active record condition in a controller @thus_section = Section.all( :conditions => [ "url_section = ?", params[:ssection] ] ) And when I try to goto to the webpage asociated with it I get the following error: ArgumentError in

Re: [Rails] Turning URL varables into URLs

2017-10-15 Thread Ben Edwards
Aslo *http://localhost:3000/upcoming_events/cost* works but not *http://localhost:3000/upcoming_events/cost/cheapevents*. On Sunday, October 15, 2017 at 6:50:08 PM UTC+1, Ben Edwards wrote: > > PS I also tried > > get 'upcoming_events/cost', to: 'upcoming_events#index' > > &g

Re: [Rails] Turning URL varables into URLs

2017-10-15 Thread Ben Edwards
PS I also tried get 'upcoming_events/cost', to: 'upcoming_events#index' On Sunday, October 15, 2017 at 6:49:10 PM UTC+1, Ben Edwards wrote: > > Great, thanks, almost there. Mine is slightly different as its not based > on CRUD, its a ruby view based on a SQL view. So > > get

Re: [Rails] Turning URL varables into URLs

2017-10-15 Thread Ben Edwards
Great, thanks, almost there. Mine is slightly different as its not based on CRUD, its a ruby view based on a SQL view. So get '/patients/:id', to: 'patients#show' Is not quite what I need. If I have this view as root view (http://domain.tld) and want to pass cost as a variable

[Rails] Re: help with ransack / mysql performance

2017-10-15 Thread Ben Edwards
your like '%Tampa% will not use an index. Looks like you are implementing some type of search. For this type of free text search SQL is not a good option. Elasticsearch is worth looking at or goodle for 'rails free text serach tools'. Ben On Thursday, October 12, 2017 at 3:17:04 PM UTC+1,

[Rails] Turning URL varables into URLs

2017-10-15 Thread Ben Edwards
OK, so I have a homepage and want the user to be able to select a link that goes back to it with a varable set. Example here is the listings site lists all events regardless of price and I want users to be able to list events under £5. So I have a link https://eventpuddle.com?price=cheap.

Re: [Rails] source level debuggin

2017-10-15 Thread Ben Edwards
I have been using ruby mine I find the productivity gain is sugnificant. Mainly due to the source level debugging. The main reason is you can easily look at the values for all the varables. you dont have to decide whitch ones to look at and add print statements. Using print statemenet I

[Rails] Re: Enhancement idea: Throw error if index references a column that does not exist

2017-10-15 Thread Ben Edwards
Sqllite is not really apropreate fro production systems. Personaly I would use Postgres, its performance is on par with MySQL and seems more robust and fully features. i would imagine the mgrations can only throw errors from the database engine. The fact that SQLlight does not throw an error

[Rails] source level debuggin

2017-10-01 Thread Ben Edwards
Bit of googeling show it seems to be possible to do source level debugging in Aptana but cant find setup instructions. Can someone please point me in the correct direction. Or if not be good to get info on IDEs where you can. Ime currently using a RubyMine evaluation but was wondering if

[Rails] what on source level debuggers

2017-10-01 Thread Ben Edwards
Ime giving Rubymine a go but am shocked a goodle search on 'ruby source level debugger' is close to useless. Is it really true that if you want a good GUI IDE to do source level debugging you have to pay? Was talking to a friend of mine who just got a job with mozilla and he knows they speed

Re: [Rails] Moving reference date from staging to production

2017-10-01 Thread Ben Edwards
On Friday, September 29, 2017 at 5:48:15 PM UTC+1, Hassan Schroeder wrote: > > On Fri, Sep 29, 2017 at 8:55 AM, Ben Edwards <lo...@funkytwig.com > > wrote: > > If your reference data is *not* immutable load-one-time-only then > your change/transform/whatever pro

Re: [Rails] Moving reference date from staging to production

2017-09-29 Thread Ben Edwards
them. Just looking for some pointers. Ben On Friday, September 29, 2017 at 4:32:58 PM UTC+1, Hassan Schroeder wrote: > > On Fri, Sep 29, 2017 at 7:57 AM, Ben Edwards <lo...@funkytwig.com > > wrote: > > In my application I have reference data tables that I setup on my

[Rails] Re: Set manually the created_at and updated_at attributes on object creation

2017-09-29 Thread Ben Edwards
And rightly so, it violates basic activerecord principles and may well break stuff. On Monday, September 25, 2017 at 6:22:12 AM UTC+1, Cassio Almeida wrote: > > Hey guys, how do I manually update created_at and updated_at attributes at > the time of object creation, I already know that this

[Rails] Re: Deploy rails app

2017-09-29 Thread Ben Edwards
Big thrums up for Digitalocean, great set of howtos. On Monday, September 25, 2017 at 6:22:02 AM UTC+1, Diego Suarez wrote: > > For the server side Digitalocean got some good ones like >

Re: [Rails] Re: Action mailer receive email

2017-09-29 Thread Ben Edwards
good point, deleted the post. On Friday, September 29, 2017 at 4:20:56 PM UTC+1, Hassan Schroeder wrote: > > On Fri, Sep 29, 2017 at 8:10 AM, Ben Edwards <lo...@funkytwig.com > > wrote: > > Not read the guide but I simply set up the details of my outgoing SMTP

[Rails] Re: Action mailer receive email

2017-09-29 Thread Ben Edwards
Not read the guide but I simply set up the details of my outgoing SMTP server in my config/enviroments/production.rb (and development.rb), something like config.action_mailer.perform_deliveries = true config.action_mailer.smtp_settings = { user_name:

[Rails] Moving reference date from staging to production

2017-09-29 Thread Ben Edwards
In my application I have reference data tables that I setup on my staging server and then when it is tested I want to move it to production. Initially I thought 'rails db:seed:dump' may be useful but there are keys between reference data and the rest of the database so this probably wont

Re: [Rails] Working out size of strings made of varable width fonts.

2017-09-23 Thread Ben Edwards
Thanks. Will have a look but it's CSS cards using UL tag and flux-box. If I had realised it would be a CSS question I would of posted elsewhere. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop

[Rails] Working out size of strings made of varable width fonts.

2017-09-23 Thread Ben Edwards
I want to use this to put truncate stuff and put ... If a text string in too long. I can work out how to do this in thery, with an array of chars and relative widths (for a specific font, in my case Helvitica) but can find details fo the widths anywhare. Any ideas? -- You received this

Re: [Rails] Missing migration file

2017-09-23 Thread Ben Edwards
;> Manually delete (through SQL) the row with the value '20170903000942' >> from the schema_migrations table. >> >> Now it is as though that missing migration was never run and doesn't >> exist. >> >> Walter >> >> > On Sep 5, 2017, at 8:10 PM,

[Rails] config.force_ssl = true problem

2017-09-18 Thread Ben Edwards
Hi. My site has a certificate and if I go to https version it works fine. Problem is then I do 'config.force_ssl = true' I get an error, page does not load and it complains redirect is to somewhere that will not load. -- You received this message because you are subscribed to the Google

[Rails] Re: Testing rails SMTP settings (seems to be really hard)

2017-09-15 Thread Ben Edwards
OK, I realised what was wrong. This was code I got from somewhere else and it does not actually send the email. So I have done a direcrent version but still having problems. irb(main):067:0* class MyMailer < ActionMailer::Base irb(main):068:1> def test_email irb(main):069:2> @recipients

Re: [Rails] disabling user accounts

2017-09-15 Thread Ben Edwards
Saying that you could probably lock the account perminately with some cleaver setup and a bit of SQL, which is almost not coding. On Friday, September 15, 2017 at 9:50:29 PM UTC+1, Ben Edwards wrote: > > LOL, I just read the original message. 'without any additional coding' &

Re: [Rails] disabling user accounts

2017-09-15 Thread Ben Edwards
LOL, I just read the original message. 'without any additional coding' seems to indicate the OP probably should not be using rails, with it being an application framework rather than a drag and drop site builder. On Friday, September 15, 2017 at 1:29:55 PM UTC+1, Hassan Schroeder wrote: > > On

[Rails] Testing rails SMTP settings (seems to be really hard)

2017-09-15 Thread Ben Edwards
OK, been trying to get my SMTP settings correct in the action Mailer for about 4 hours now and running out of ideas. The problem is that whatever I do I cant find any errors in logs but also don’t get any emails. So I tried doing it in 'rails console', but still not getting any errors (or

Re: [Rails] problem starting unicorn, says unicorn not installed but it is

2017-09-13 Thread Ben Edwards
get home. On Wednesday, September 13, 2017 at 8:30:23 AM UTC+1, Norbert Melzer wrote: > > Have you installed it for the correct user? Or locally to your current? > > On Mi., 13. Sep. 2017, 03:12 Ben Edwards <lo...@funkytwig.com > > wrote: > >> Logfile is: &

[Rails] problem starting unicorn, says unicorn not installed but it is

2017-09-12 Thread Ben Edwards
Logfile is: ben@whatnow:~/eventpuddle/eventpuddle/rails/eventpuddle$ systemctl status unicorn_eventpuddle.service ● unicorn_eventpuddle.service - LSB: starts the unicorn app server Loaded: loaded (/etc/init.d/unicorn_eventpuddle; bad; vendor preset: enabled) Active: failed (Result:

Re: [Rails] Re: routes

2017-09-12 Thread Ben Edwards
+1 post output from '$ rails routes', it will really help people help you. also 'NoMethodError in Gallery#new sounds like the new method is missing from the Gallery controller so posting that would also be good. Ben On Tuesday, September 12, 2017 at 3:23:21 PM UTC+1, Colin Law wrote: > > On

Re: [Rails] unicorn/nginx rbdev seting ruby version

2017-09-12 Thread Ben Edwards
get and set the ruby version to use within the app. > > rbenv local 3.2.1 > > will set the ruby version. It does this by creating or modifying a > .ruby-version file in the application root. > > Walter > > > On Sep 12, 2017, at 3:25 PM, Ben Edwards <lo...@funk

[Rails] unicorn/nginx rbdev seting ruby version

2017-09-12 Thread Ben Edwards
Hi, ive managed to get unicorn/nginx working (using https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04) and i am using rbenv. The setup used a .rbenv-vars configuration file in the ruby app directory. what I cant figure out is

[Rails] Re: Receiving Email in rails

2017-09-11 Thread Ben Edwards
Think you need to have a look at ruby solution, which you can fold into rails, or use stand alone to populate a DB. type something like 'ruby read emails -gmail' into your favourite search engine. Not everything is solved by finding the right gem, sometimes you have to code stuff yourself.

Re: [Rails] Re: routes

2017-09-11 Thread Ben Edwards
Ineptitude;): Should be http://guides.rubyonrails.org/routing.html. Ben On Monday, September 11, 2017 at 6:33:09 PM UTC+1, Hassan Schroeder wrote: > > On Mon, Sep 11, 2017 at 10:16 AM, Ben Edwards <lo...@funkytwig.com > > wrote: > > > http://guides.rubyonrails.org

Re: [Rails] Taking project from deveopment through test to production (worflow)

2017-09-11 Thread Ben Edwards
=AFQjCNHycyJCw8I6pyES5ucJMACNfAHfrgHad a glance through the rails guide and it looks great. Shame I can just buy it, ime not a big fan of the subscription model. Thansks, Ben On Sunday, September 10, 2017 at 7:45:43 PM UTC+1, Walter Lee Davis wrote: > > > > On Sep 10, 2017, at 2:33 PM, Ben Edwards <lo..

Re: [Rails] Taking project from deveopment through test to production (worflow)

2017-09-11 Thread Ben Edwards
in detail. Thanks everyone for taking the time to reply, it is really appreciated. On Sunday, September 10, 2017 at 8:04:20 PM UTC+1, Norbert Melzer wrote: > > On 09/10/2017 08:33 PM, Ben Edwards wrote: > > Sorry 'git checkout test'. I have develop, test and master branches. > &g

[Rails] Re: routes

2017-09-11 Thread Ben Edwards
As Nobert says they are independent. Post your routes.rb, where the view is you want the route to go to and say what you were expecting. http://guides.rubyonrails.org/v3.1.3/routing.html may help. Also if you have not done so do the Getting started guide on the rails website. See it

Re: [Rails] Taking project from deveopment through test to production (worflow)

2017-09-10 Thread Ben Edwards
. On Sunday, September 10, 2017 at 6:05:04 PM UTC+1, Hassan Schroeder wrote: > > On Sun, Sep 10, 2017 at 9:05 AM, Ben Edwards <lo...@funkytwig.com > > wrote: > > 've been googling for this for a while wit little joy. Maybe I’m using > the > > wrong searc

[Rails] Taking project from deveopment through test to production (worflow)

2017-09-10 Thread Ben Edwards
've been googling for this for a while wit little joy. Maybe I’m using the wrong search terms but I’m very surprised there is not a howto guide;(, What I am trying to work out it how to take a project from development to test (and test) and then to production. I will make the environments the

[Rails] Taking project from deveopment through test to production (worflow)

2017-09-10 Thread Ben Edwards
I've been googling for this for a while wit little joy. Maybe I’m using the wrong search terms but I’m very surprised there is not a howto guide;(, What I am trying to work out it how to take a project from development to test (and test) and then to production. I will make the environments

[Rails] Re: Understanding scema_migrations schema.rb

2017-09-09 Thread Ben Edwards
> On Friday, September 8, 2017 at 1:56:22 PM UTC+2, Ben Edwards wrote: >> >> Thanks, I do have scripts that backup the database, there is >> configuration data in there. git reset --hard / db:structure:load seems a >> bit drastic. It seems if I run db:schema:dum

[Rails] Re: Understanding scema_migrations schema.rb

2017-09-08 Thread Ben Edwards
PS thanks for the link to the guide. Have been looking through 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

[Rails] Re: Understanding scema_migrations schema.rb

2017-09-08 Thread Ben Edwards
of > your DB and replace it with what's defined in your schema.rb). > > On Thursday, September 7, 2017 at 7:49:23 PM UTC+2, Ben Edwards wrote: >> >> Hi, ime trying to get my head around how these interact as I acidentely >> deleted a migration and had not commited it to git. >&g

[Rails] Understanding scema_migrations schema.rb

2017-09-07 Thread Ben Edwards
Hi, ime trying to get my head around how these interact as I acidentely deleted a migration and had not commited it to git. The migration is 'up'. So I did some research and it seems if I just delete the migration from the schema_migrations (and make sure the corresponding database object does

Re: [Rails] Missing migration file

2017-09-06 Thread Ben Edwards
the DB first is another strategy. On Wednesday, September 6, 2017 at 4:31:57 PM UTC+1, Hassan Schroeder wrote: > > On Wed, Sep 6, 2017 at 1:07 AM, Ben Edwards <lo...@funkytwig.com > > wrote: > > > On the git front I don’t tend to commit stuff that does not work but I > gue

Re: [Rails] Missing migration file

2017-09-06 Thread Ben Edwards
PS changes are not in production. -- 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+unsubscr...@googlegroups.com. To post to this group,

Re: [Rails] Missing migration file

2017-09-06 Thread Ben Edwards
t; > Now it is as though that missing migration was never run and doesn't > exist. > > Walter > > > On Sep 5, 2017, at 8:10 PM, Ben Edwards <lo...@funkytwig.com > > wrote: > > > > I accidentally deleted a migration file and its up. I looked in the > devel

[Rails] Re: Missing migration file

2017-09-05 Thread Ben Edwards
PS I haven’t actually deployed anything to production. I do want to this week which is why I want to sort this out. On Wednesday, September 6, 2017 at 1:10:24 AM UTC+1, Ben Edwards wrote: > > I accidentally deleted a migration file and its up. I looked in the > develo

[Rails] Missing migration file

2017-09-05 Thread Ben Edwards
I accidentally deleted a migration file and its up. I looked in the development.log and it was to create a view I don’t actually need. database: eventpuddle_development Status Migration IDMigration Name -- up 20170901234251 Create

[Rails] Re: Using views as a backend for rails

2017-09-05 Thread Ben Edwards
> > class CurrentEventsController < ApplicationController > def index > @current_events = CurrentEvent.limit(100 > end > end > > On Sunday, September 3, 2017 at 4:26:42 AM UTC+2, Ben Edwards wrote: >> >> Ive been reading quite a few guides on this and my first attempt

[Rails] Re: Using views as a backend for rails

2017-09-02 Thread Ben Edwards
Just noticed and error in the view, should of been <% @current_events.each do |ce| %> Now getting a different error: undefined method `each' for nil:NilClass On Sunday, September 3, 2017 at 3:26:42 AM UTC+1, Ben Edwards wrote: > > Ive been reading quite a few guides on this

[Rails] Using views as a backend for rails

2017-09-02 Thread Ben Edwards
Ive been reading quite a few guides on this and my first attempt was not successful. What I have done so far is writern n a migration for the view and got that working: class UpcommingEvents < ActiveRecord::Migration[5.1] def up self.connection.execute %Q( CREATE OR REPLACE VIEW

Re: [Rails] Moving stand alone scripts into rails, architecture

2017-09-02 Thread Ben Edwards
On Saturday, September 2, 2017 at 5:05:10 PM UTC+1, Hassan Schroeder wrote: > > On Fri, Sep 1, 2017 at 6:50 PM, Ben Edwards <lo...@funkytwig.com > > wrote: > > > So do I put the venue and event methods in to controllers or is there > > somewhere else. T

Re: [Rails] Moving stand alone scripts into rails, architecture

2017-09-02 Thread Ben Edwards
Yes, I'me building a website that lists what’s on at local venues. Others have suggested I move the scripts into rails and using ActiveRecords certainly appals to me. Ime very open to suggestions/advice and if I can use ActiveRecord and the models from my ruby app, and keep the scripts stand

[Rails] Moving stand alone scripts into rails, architecture

2017-09-01 Thread Ben Edwards
This is going to be a bit of a long one;) I have a bunch of stand alone scripts that I want to move into rails. They are batch scripts that update the database (run from cron). Where I live the music listings websites are very incomplete so I am using web scrapers to collect listings for a

Re: [Rails] Inttegrating existing rb scripts into rails.

2017-09-01 Thread Ben Edwards
On Fri, Sep 1, 2017 at 12:02 PM, Ben Edwards <lo...@funkytwig.com > > wrote: > > > Now a bit of context is probably needed. I will have quite a lot of > scripts > > (possibly 40, each one is a web scraper). They do very gentle scraping > > (i.e. a http request ev

Re: [Rails] Inttegrating existing rb scripts into rails.

2017-09-01 Thread Ben Edwards
On Friday, September 1, 2017 at 7:31:14 PM UTC+1, Hassan Schroeder wrote: > > On Fri, Sep 1, 2017 at 11:00 AM, Ben Edwards <lo...@funkytwig.com > > wrote: > > > So I take it I need to run this from the rails app directory? Where > should I > > put the scripts,

Re: [Rails] Inttegrating existing rb scripts into rails.

2017-09-01 Thread Ben Edwards
this (currently everything is in a module called scrape so I would put it in the ruby app under lib/scrape, or I could have a lib under vendor. What would be best proactive. On Friday, September 1, 2017 at 5:47:37 PM UTC+1, Hassan Schroeder wrote: > > On Fri, Sep 1, 2017 at 9:27 AM, Ben Edwar

[Rails] Inttegrating existing rb scripts into rails.

2017-09-01 Thread Ben Edwards
Hi, sorry be again;). I have writtern a set of ruby scripts that are used to poulate a database that I am going to use rails as a front end for users. Curently they are stand alone, having there own lib directory and a few classes. These scripts are run every night using cron/bash. I am

[Rails] Re: Building rails app on existing Postgres Database

2017-09-01 Thread Ben Edwards
Great, so youn dont need to give rails a model file? -- 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+unsubscr...@googlegroups.com. To

[Rails] Re: Building rails app on existing Postgres Database

2017-09-01 Thread Ben Edwards
but there are quite a few columns. On Friday, September 1, 2017 at 2:56:35 PM UTC+1, Ben Edwards wrote: > > Hi, I have a fairly simple database with a few tables and want to build a > rails app on it. I know I need to do some changes to make it conform to > ActiveRecord conventions but

[Rails] Building rails app on existing Postgres Database

2017-09-01 Thread Ben Edwards
Hi, I have a fairly simple database with a few tables and want to build a rails app on it. I know I need to do some changes to make it conform to ActiveRecord conventions but when I have done that how do I best access it from rails? I have found this,

Re: [Rails] Good version to use in a production enviroment

2017-08-24 Thread Ben Edwards
On Thursday, August 24, 2017 at 3:42:10 AM UTC+1, Phil wrote: > > > Latest stable is Rails 5.1.3 and Ruby 2.4.1. I'd not try to use older > versions... upgrading deprecated stuff in Rails is a PITA, and older Rubys > are slower and coming to EOL for security patches anyway. I'm also on >

[Rails] Re: Good version to use in a production enviroment

2017-08-24 Thread Ben Edwards
On Wednesday, August 23, 2017 at 4:55:37 PM UTC+1, Ben Edwards wrote: > > Hi, we are setting up Ruby on Rails on a production server. Advice on > what version of ROR and Ruby to use would be great. Obviuiously we want > something stable and not too cutting edge. > > Also

Re: [Rails] Good version to use in a production enviroment

2017-08-23 Thread Ben Edwards
Rolandas, Thanks for that. Have setup a master/prod and dev branch/database. file structure is dev/eventtpuddle/ and prod/eventpuddle, with each having 'lib' etc in them. Was thinking of putting a rails directory in each to keep everything in the git tree. Does this make seance. I guess I

[Rails] Good version to use in a production enviroment

2017-08-23 Thread Ben Edwards
Hi, we are setting up Ruby on Rails on a production server. Advice on what version of ROR and Ruby to use would be great. Obviuiously we want something stable and not too cutting edge. Also advice on keeping it up to date, especially regarding secularity, would be great. We have great Linux