Re: [Rails] Re: Can I do <%=.%> interpolation without getting a tag?

2014-07-07 Thread James Turley
if you change js_unhide_idstrings.join(',') to js_unhide_idstrings.join(',').html_safe that should decode the entities. On Mon, Jul 7, 2014 at 10:50 AM, Ronald Fischer wrote: > > If you just want to print out the bare text, you can just put that in > > your > > erb tag: <%= my_variable %> > > T

Re: [Rails] Can I do <%=.%> interpolation without getting a tag?

2014-07-07 Thread James Turley
This is an effect of using the simple_format method: http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-simple_format "Returns text transformed into HTML using simple formatting rules. Two or more consecutive newlines(\n\n)

Re: [Rails] Charts in Rails 4 application

2014-03-03 Thread James Turley
Also consider D3? http://d3js.org/ It's an open source html5-based javascript visualisation library. There's a gem here: https://github.com/logical42/d3_rails On Mon, Mar 3, 2014 at 6:33 AM, Manoj M. wrote: > Hi, > Somebody advice me to find a better solution to implement charts in my > Rails

Re: [Rails] OT: buying a Mac computer

2014-02-26 Thread James Turley
If your needs were exactly the opposite (ie, your laptop was fine for development but you were looking for more spit and polish and irreplaceable proprietary software on a general computer), then a Mac would be a good idea. But really: Linux is, in absolute terms, *better for development *(open so

Re: [Rails] Hi i;m new in Ruby on Rails need same help

2014-02-17 Thread James Turley
This is, as the error implies, a postgres authentication error. Check that the user postgress exists (possible typo for postgres?), and while you're at it, that it has permission to create and modify databases. If you still get the error, you'll need to switch to another form of authentication. Se

Re: [Rails] (Newb alert) One-to-many...

2014-02-11 Thread James Turley
NB: AddFooToPosts would be AddOwnerIdToCats, I just messed up the copy paste. On Tue, Feb 11, 2014 at 11:10 AM, James Turley < jamesturley1...@googlemail.com> wrote: > Example: an owner has many cats. > > In your Cat model, add the line: > belongs_to :owner > > in your O

Re: [Rails] (Newb alert) One-to-many...

2014-02-11 Thread James Turley
Example: an owner has many cats. In your Cat model, add the line: belongs_to :owner in your Owner model, add the line: has_many :cats You then need to run a migration on your cats table, to add the foreign key for owners, so Rails can build the associations. From the command line: rails g migra

Re: [Rails] LAMP server configuration on Linux

2014-01-21 Thread James Turley
Passenger is your friend: http://www.modrails.com/documentation/Users%20guide%20Apache.html On Tue, Jan 21, 2014 at 5:58 PM, Gift Mfugale wrote: > Dear friends! > Can anyone help: > I want to configure my a LAMP server to run a rail based application > Thanks. > > -- > You received this messa

Re: [Rails] Re: rails3 cap deploy error

2014-01-14 Thread James Turley
Double check you have libxml2-dev and libxslt-dev packages installed on your staging server... Nokogiri won't build without them available on the machine. On Tue, Jan 14, 2014 at 1:41 PM, jsnark wrote: > Look at the file > > > /apps/myapp_com/staging/shared/bundle/ruby/1.9.1/gems/nokogiri-1.6.1

Re: [Rails] Proof of concept

2014-01-14 Thread James Turley
ed or postponed, change the date! On Tue, Jan 14, 2014 at 10:44 AM, James Turley < jamesturley1...@googlemail.com> wrote: > To the gist, I'd add home_goals and away_goals columns to the Game model, > given the nature of the beautiful game. Your Post model would include > "b

Re: [Rails] Proof of concept

2014-01-14 Thread James Turley
To the gist, I'd add home_goals and away_goals columns to the Game model, given the nature of the beautiful game. Your Post model would include "belongs_to :game", and on the other side the Game would have "has_many :posts". You'd then add a game_id column to the Posts table using a migration. Don

Re: [Rails] File rename - permision denied

2014-01-13 Thread James Turley
File.chmod will presumably only work if your Ruby process is being executed by a user with the required permissions to run chmod in the first place; I suspect not in this case. Change the permissions on the directory with your files in so that user can access it, using the shell. On Mon, Jan 13,

Re: [Rails] Re: Hartl rails tutorial need help - regd "Test-driven development" introduction

2014-01-11 Thread James Turley
Boot up the server and look at the page in your browser. See if the phrase "Sample App" is on it (case sensitive), or if there's a nice big red error message. On Sat, Jan 11, 2014 at 6:30 PM, Max wrote: > please post the test code you're trying to run. also, unless it's a lot > of text, add th

Re: [Rails] front end development

2014-01-08 Thread James Turley
Assuming the trouble is with bootstrap's dependency on Windows-unfriendly LESS: Have you seen the bootstrap-sass gem? Surely if you can get Ruby running you can compile SASS/SCSS... https://github.com/twbs/bootstrap-sass On Wed, Jan 8, 2014 at 3:55 PM, Unnikrishnan Patel < unnipatel.pa...@gmail.

Re: [Rails] Re: Best IDEs for Ruby on Rails

2014-01-07 Thread James Turley
This might help? http://docs.sublimetext.info/en/latest/reference/build_systems.html#file-format When I was using an IDE for this, it was Aptana, which has a shell built in (and most of the other standard extra IDE gubbins, which if you're otherwise happy with ST, you probably don't want). Code c

Re: [Rails] Bundle Installing nokogiri - ruby 2.0.0 gives error

2014-01-06 Thread James Turley
When I've had this problem, it's been fixed by installing the relevant dev libraries - libxml2-dev and libxslt-dev. How you do that depends on OS, etc. On Ubuntu, just sudo apt-get install them. On Mon, Jan 6, 2014 at 10:04 AM, Colin Law wrote: > On 6 January 2014 09:30, M,Gopi M.gopinath wrot

Re: [Rails] Working with JavaScript

2014-01-06 Thread James Turley
As Walter says, Coffeescript by default compiles to javascript like this: (function() { // your code here... }).call(this); This creates a closure: code within it can only be accessed by other code within it by default. In addition to Walter's ideas, you could: 1) define paintIt as window.pain

Re: [Rails] Why not make Opal default for Rails?

2014-01-02 Thread James Turley
I would be opposed to this. In fact, I don't really like having CS as default, though I use it for preference, for the same reason: Javascript, not anything else, is the de facto language of the client side. Javascript should be the default. CS as a default isn't so bad as it is designed primarily

Re: [Rails] configuring rails app in LAMP or WAMP server

2013-12-23 Thread James Turley
Breaking it down: Linux/Windows: if you've successfully installed ruby and rails on your machine, job done. Apache: standard way to get rails running on Apache is with mod_passenger. Detailed instructions here . I don't know how

Re: [Rails] Yelp Clone on Rails

2013-12-18 Thread James Turley
Hi, What you're looking to build here is a fairly complicated web app with, presumably, a lot of custom taxonomy (sorting things by area of business, neighbourhood, etc) - a large, document-driven app. This is definitely something you'd be better off using a framework like Rails for, rather than W

Re: [Rails] Javascript and Ruby on rails

2013-12-02 Thread James Turley
Are you getting any errors in the javascript console? On Sat, Nov 30, 2013 at 5:10 AM, Harry Pho wrote: > I'm learning on creating a website using Ruby on Rails (RoR). I had an > HTML template that I created when I worked with JSP 2 years ago, and now I > want to reuse it in my RoR website. Thi

Re: [Rails] '$ rake db:create' don't work!

2013-11-27 Thread James Turley
This seems to be a common issue (affects some Python users as well). The install of libmysqlclient seems not to be on your PATH. A stackoverflow question came up with this solution: sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib (ie, you symlink the file

Re: [Rails] '$ rake db:create' don't work!

2013-11-27 Thread James Turley
(SO link: http://stackoverflow.com/questions/4546698/library-not-loaded-libmysqlclient-16-dylib-error-when-trying-to-run-rails-serv ) On Wed, Nov 27, 2013 at 1:29 PM, James Turley < jamesturley1...@googlemail.com> wrote: > This seems to be a common issue (affects some Python user