Ruby on Rails Wednesday, April 30, 2014

I have the production and staging site on two different server ips. But the database, another server ip, is the same database used by both production and staging. When i set up the capistrano deploy task for both the production and staging, should I keep the db role in deploy.rb like this:

deploy.rb
role :db,  "database_ip", :primary => true 

production.rb
role :web, "production_ip"
role :app, "production_ip"

staging.rb
role :web, "staging_ip"
role :app, "staging_ip"

Or should I do it this way:

production.rb
role :web, "production_ip"
role :app, "production_ip"
role :db,  "database_ip", :primary => true 

staging.rb
role :web, "production_ip"
role :app, "production_ip"
role :db,  "database_ip", :primary => true 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f4494c9d-b537-4e7e-b92f-b50f56520870%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hello,

I am currently studying hard to switch careers also. I'm currently a musician (drummer) and am learning on my own. I have found a lot of resources online and many great books already. I was planning on writing a blog post about that so I'll try to do that soon. Keep an eye out at drumusician.com

A few things you could try:

Some nice online courses:
- codeschool.com
- codecademy.com

Some books:
- Rails 4 in Action
- RubyonRails tutorial by Michael Hartl
- Learn To Program by Chris Pine

And I am currently just starting to build stuff, which is actually one of the best thing to do. I am now building this site www.learnrubyonrails.org what actually will be of great help in managing learning resources.

Hope this helps.

Cheers!

Tjaco

Op dinsdag 29 april 2014 20:54:56 UTC+2 schreef Ruby-Forum.com User:
Hello All,

I'm currently working in the medical equipment research and development
industry and I'm looking to switch industries to become a Rails
developer. I've been focusing on getting to know Ruby for the past
couple months and am feeling fairly comfortable with it. I want to start
moving on and start on Rails now, but want some people's opinions on
where to start.

How'd you all get started?
Did any of you switch industries in to Rails development?

I'd be very interested in talking to someone who did switch industries
successfully after studying Ruby/Rails independently. I'm a quick
learner so picking up all these languages isn't a problem and just takes
time, but I would really like some advice on how to reach that end goal
of actually landing a job as a Rails developer (freelance work, where I
should be before I START looking for freelance jobs, developing a Rails
portfolio, etc.).

Seeing someone else's Rails portfolio would be a huge help!

Thanks in advance!

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/102885f0-6b5a-4ccb-adb4-03d9058b76f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I am seeking full-time Ruby on Rails Developers for the Raleigh, Atlanta, Boston, and Nashville markets.

If you are a RoR Developer in those markets or willing to relocate to one of those markets, please email me ASAP at bethdickey@resolution-tech.com

I am looking for 1+ year(s) of experience in RoR development.  Seeking individuals who are passionate about Ruby on Rails development who wants to work with cutting edge technologies.  Professional experience is preferred, but we will consider candidates working with RoR extensively on the side.

We pay excellent referral fees!


Beth Dickey McCart
Resolution Technologies
(770)670-5586
bethdickey@resolution-tech.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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/284d04e3-ad0f-49ec-b3bb-efb3fc4cf4fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I'm still very new to rails, but I want to start working on my project.
I want to create a website that is similar to 99designs where people can
connect and perform jobs for each other.

I'm thinking about what would be the best way to map it out. Would I
need a separate controller/model for the freelancer vs the person
hiring? They will all be associated with the user controller correct?

Then I would need a profile, would this be considered a user has_one
profile or user has_many?

Thanks! Any additional advice would be great.

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b96c7d41d76cfd54620ace80230cafcc%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Awesome! Thanks Dave. What about some books that anyone has found really
helpful? Doesn't even have to be rails specifically, anything would
help.

Thanks!

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3aa9ff5f32f054114560d60328176cea%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Tue, Apr 29, 2014 at 2:54 PM, Patrick Stauch <lists@ruby-forum.com> wrote:

> I'd be very interested in talking to someone who did switch industries
> successfully after studying Ruby/Rails independently.

Check out http://joshuakemp.blogspot.com -- he used to be a *farrier*!

(I didn't switch industries myself; I've always been a dev, tho
previously mostly non-web.)

-Dave

--
Dave Aronson, freelance software developer (details @ www.Codosaur.us);
see also www.PullRequestRoulette.com, Blog.Codosaur.us, www.Dare2XL.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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHxKQijWs1koBfsPEK8otbxrDsyPunjuURapWHzb1wvsG2cDHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I've been able to set things up to display a result of queries using
youtube_it gem my current code for fetching that data is

def index
$client = YouTubeIt::Client.new(:dev_key =>
"AI39si6i1NPgrU35e6xxRgvtGclAdH9pHnwefuUbHKZmKJutqDNvTZwY3PawefEY9rarYzmpN__UuMH19bAny0-retoMa8IsNILlDA")
@videos = $client.videos_by(:tags => ['funnyvideo'])
end


The thing is that I want to allow the user to input what they want to
search instead of me putting in funny video, I want a search bar that
allows users to type in their tags.


My current search bar looks something like this
<% form_tag videos_path, :method 'get' do %>
<%= text_field_tag :search %>
<%= submit_tag "search" %>
<% end %>


How can I pass in whatever the user type into the search bar to fetch
the youtube tags?


Thanks

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/68ba0c1234813047e18aa0192b5bec91%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Thanks! So I renamed /views/background/randomize.html.erb to /views/background/_randomize.html.erb and changed the method name in the background controller to _randomize as well. I put <%= render :partial => "background/_randomize" %> in application.html.erb.

Some things work, some things don't. So my randomize method simply sets @swf_bg to a random file in the public folder and then I put <%= @swf_bg %> in the _randomize.html.erb view. This is displayed properly when I go to /background/_randomize.html.erb, but when I go to the index of my site it's not including the @swf_bg variable that displays correctly when I go to /background/_randomize

it's including the code from _randomize.hml.erb in my main page like: <embed src="" /> instead of <embed src="/random/swf/file.swf" />, but when I visit /background/_randomize in my browser it works fine.

2014年4月27日日曜日 15時59分57秒 UTC-5 mike2r:


On Saturday, April 26, 2014 2:45:58 PM UTC-4, Kazuna Nakama wrote:
Hi Everyone, this is my first post on Ruby on Rails, I've managed to get up and running with Rails 4.1 on FreeBSD with Nginx and Ruby 2.1.1. 

My issue is this:

I have a folder located at /public/swf/ that contains numerous swf files I want to load as a background for every page of my site. I've successfully created a controller with a randomize method and a corresponding view that loads the backgrounds randomly. The problem I'm having a bit of trouble with now is getting the output of /background/randomize.html.erb and putting that output into the application layout so the backgrounds load on every page. My HTML/CSS is just fine, however I can't seem to include that in the application view.


Would I be using the render method, content_for, or capture do for taking the raw parsed HTML output of background/randomize and putting it in the application layout?

I would rename randomize.html.erb as a partial and render it in the application layout.   If you haven't worked with partials, refer to the following:


mike

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fd668ab6-1536-42fd-bd5a-a0d3c2c9b87d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Tuesday, 29 April 2014 03:50:39 UTC-4, ngo...@googlemail.com wrote:
Hi,

On Monday, April 28, 2014 9:31:06 PM UTC+2, Matt Jones wrote:

This doesn't make any sense to me - if I request a ReportsSubject object from the database directly (via `find`, for instance), what do I get if I ask for its subject? What would the reports_subjects table even *store*? A bare `subject_id` would be insufficient since without a class_name it's unclear what table that ID refers to.

A "report subject" (a row in the join table) doesn't carry any semantics without the report, which has further information about required details. A report also only ever has a single type of subject, so IMO it would not make sense to store a couple thousand repetitions of an STI name (although note that the subjects are not all part of a single STI hierarchy!) in a column that adds no information at all to the system.
 
And that's not even considering what should happen when this sort of code runs:

Report.joins(:subjects).where(name: 'hey wait WHAT TABLE IS THIS EVEN QUERYING')

This is not functionally different from having the polymorphic subject type specified in the join table.

There are a bunch of ways out of this situation, but the right choice depends on what exactly you need to do with the models. Starting from this use case, I'm going to discuss some tradeoffs and possible approaches. The code is more for illustration than anything else; details may be missing, etc.

  class Report < ActiveRecord::Base
    has_many :reports_subjects
    has_many :subjects, through: :reports_subjects, class_name: ->(report) { report.subjects_type }

    def subjects_type
      # divine required subject model class somehow
    end
  end

  class ReportsSubject < ActiveRecord::Base
    belongs_to :report
    belongs_to :subject # DOESN'T EXIST, class_name is based on parent Report instance
  end

Approaches:

* STI for subjects, with a validation to ensure all the subjects are the same type. I assume this is impractical in your use case. But if it works, it's ideal - eager-loading works, adding subjects with `@report.subjects << subject` works, joins work.

None of the approaches below will work with eager-loading.

* If the set of possible subject types is known to Report (likely, since it's deciding which one to use) a polymorphic association + some metaprogramming could work:

  class Report < ActiveRecord::Base
    POSSIBLE_TYPES = %w(Foo Bar Baz)
    has_many :reports_subjects

    POSSIBLE_TYPES.each do |type|
      has_many "#{type.underscore}_subjects", through: :reports_subjects, source: :subject, source_type: type
    end

    def subjects(reload=false)
      send("#{subjects_type.underscore}_subjects", reload)
    end

    def subjects_type
      # divine required subject model class somehow
      # return a *string* from POSSIBLE_TYPES
    end
  end

  class ReportsSubject < ActiveRecord::Base
    belongs_to :report
    belongs_to :subject, polymorphic: true
  end

This gives a "faux" association `subjects` that behaves mostly like a real association:

  @report.subjects.to_a            # works
  @report.subjects << new_subject  # works, raises if you try to push an object that isn't of subjects_type
  @report.subjects.count           # works

but not quite:

  Report.joins(:subjects)         # unknown association 'subjects'

This approach does require a `subject_type` column on reports_subjects. Worries about the performance impact of storing duplicate string values many times is (IMO) premature optimization, but your use case may be different.

* If a `subject_type` column is unfeasible for reasons, there's another way which drops more ActiveRecord machinery.

  class Report < ActiveRecord::Base

    has_many :reports_subjects

    def subjects
      subjects_type.joins(:reports_subject).where(reports_subject: { report_id: id })
    end

    def subjects_type
      # divine required subject model class somehow
      # prefer to return a real Class object here
    end
  end

  class ReportsSubject < ActiveRecord::Base
    belongs_to :report

    def subject
      report.subjects_type.find(subject_id)
    end
  end

  class SomeSubjectThingy < ActiveRecord::Base
    # this is needed in any class that Report can refer to; consider making it a concern
    has_many :reports_subjects, foreign_key: :subject_id
  end

You'll need to supply a method to actually build ReportsSubject objects for a given report, as << will not work on a report's `subjects` property. You'll also likely want to guard against inserting subjects of multiple types, as `ReportsSubject` no longer contains any information regarding what type its subject is.

Some even farther-afield approaches to think about:

* if a Report can only have one subject_type, are all Reports really instances of the same class? Perhaps Report is just a base class for more specific types (FooReport, etc) that have specific associations?

  class FooReport < Report
    has_many :foo_reports_subjects
    has_many :subjects, through: :foo_reports_subjects
  end

  class FooReportsSubject < ActiveRecord::Base # or ReportsSubject, YMMV
    self.table_name = 'reports_subjects'

    belongs_to :report, class_name: 'FooReport'
    belongs_to :subject, class_name: 'Foo'
  end

Given how similar these classes are, it might make sense to metaprogram them. Note that `reports_subjects` does *not* need a `type` column here.

* if you need eager-loading but don't want to do STI subjects, maybe consider a "wrapper" object that lets you eager-load what you want. For instance, suppose that you'd like to get the name of each subject (for UI, etc) when loading a bunch of reports.

  class Report < ActiveRecord::Base
    POSSIBLE_TYPES = %w(Foo Bar Baz)
    has_many :reports_subjects
    has_many :subject_shims, through: :reports_subjects

    def title
      "Report on #{subject_shims.map(&:name).join(', ')}"
    end

    # deal with :subjects somehow
  end

  class ReportsSubject < ActiveRecord::Base
    belongs_to :report
    belongs_to :subject_shim
  end

  class SubjectShim < ActiveRecord::Base
    # denormalize the `name` value from subject into subject_shims `name` column
    has_many :reports_subjects
    belongs_to :subject, polymorphic: true
  end

Then you can still do this:

  Report.includes(:subject_shims).each { |x| puts x.title }

without causing a SQL query per-Report. There are fewer `type` columns here (one per subject, instead of one per subject per report) but an extra database table.

---

Happy to help out if any of these look promising.

--Matt Jones

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/71067b1b-42e9-4ae2-ac2d-ec8318807077%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hey, 

Is there an automated way of loading initializers depending on whether you are currently using ruby or jruby? I have an internal gem that loads some jRuby tasks, but I fail to run them because other non-jruby initializers keep erroring out, understandably since they are not currently installed as jruby gems. 

Assuming the following gemfile: 

----------------
gem rails 

platform :ruby do
  ruby '2.1.0' if RUBY_ENGINE == 'ruby'
  gem A  # Not needed when running jruby
end

platform :jruby do
  ruby '1.9.3' if RUBY_ENGINE == 'jruby'
  gem 'internal_gem'
end
--------------

I won't be able to run anything provided by 'internal_gem' unless I move gem A to the jruby platform, which is not very nice because it would mean I will be doing it for every gem I add. 

Any ideas? 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0dd04017-b53f-48d2-b653-a163d4542ea0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Paperclip supports multiple files in a single upload anyway. All you need to do is make a form on another parent model (that model should be set to `accepts_nested_attributes_for` the model you have attached your file to), add the multiple => true flag to your file field, and force the name of the file field to conform with this pattern:

:name => 'parent_model_name[attachment_model_name][][attachment_name]

So for User has_many :avatars, accepts_nested_attributes_for :avatars and Avatar has_attached_file :image, the field would be named:

'user[avatars_attributes][][image]'

Upload that nested form and as many Avatar objects as your form field held individual files will be magically created. No drama, no jQuery, no plugins in the browser*.

Walter

*Where by browser I mean **modern** browser.

On Apr 29, 2014, at 11:49 PM, Lauree Roberts wrote:

> You want to use paperclip for handling files and rails 4 as framework. All you need is the implementation for uploading multiple images.
>
> There are many javascript plugins out there if you want go for JS way. Following are some easy to integrate plugins:
>
> * jQuery File Upload => http://blueimp.github.io/jQuery-File-Upload/
> * Plupload => http://www.plupload.com/
> Or you can use plupload_rails3 gem https://github.com/codeodor/plupload-rails3.
>
> Which is easy to integrate and usages Plupload gem.
>
> Following are some links which may help you:
>
> * http://5minutenpause.com/blog/2013/09/04/multiple-file-upload-with-jquery-rails-4-and-paperclip/
> * http://ikbenbitterzoet.com/2010/09/18/multiple-file-upload-with-plupload.html
> * http://spin.atomicobject.com/2011/10/31/upload-files-directly-to-s3-with-plupload-rails-and-paperclip/
> * http://amgrade.com/blogs/thoughts/multiple-files-upload-rails
>
> Regards,
> Lauree
> (Ruby on Rails Developer)
>
>
>
> On Tuesday, April 29, 2014 2:40:37 AM UTC+5:30, Eugeniu Tambur wrote:
> Hello, I'm learning rails and creating a small project,
> Someone could tell me how can I upload multiple images with paperclip in rails 4?
>
> Thank you very much, I hope someone can help me.
> Greetings.
>
> --
> 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+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/aee138a6-0112-4fee-8168-2781bd420666%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/D45FEAEC-B579-4E2B-849B-1B690A1538AC%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 30 April 2014 11:26, Peter K. <lists@ruby-forum.com> wrote:
> Hi,
>
> Also new to ruby... I get the same error.
>
> Did you ever get a meaningful reply to your query? Or is this just
> another forum where real problems never get answered in the hope that
> they go away?

This is not a forum it is a mailing list (though you may be accessing
it using a forum-like interface. Since you have not quoted the
previous reply we do not know to what you are referring. Start a new
thread (preferably by joining the mailing list) and post a message
showing the error you are getting and telling us which operating
system you are using. Almost certainly someone will be able to help.

Colin

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuStFMY7tYQ9HK22DzMxNgbTkEKAA-QkXNz9Y6R7C%2BEQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi,

Also new to ruby... I get the same error.

Did you ever get a meaningful reply to your query? Or is this just
another forum where real problems never get answered in the hope that
they go away?

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e9f8d31ec8b9a68403b5634006cbad45%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Tuesday, April 29, 2014



On Tuesday, April 29, 2014 12:58:17 PM UTC+1, Ruby-Forum.com User wrote:
Hi,

I have written some controller methods and testing it using Rspec. I am
just learning the Rspec by testing those methods. I need some hints on
how to do it. I have the below method in my QueueItemsController and I
need to test it. So how do I proceed. Please help. I read the tutorials
and other online forums but it seems to be confusing at some point.

In  a nutshell you think of the possible case, what the outcome should be and how do you want to test that the outcome was as expected.

For example, one of those cases could be

context 'the queue is empty' do
  before(:each) do
    #some setup so that @queue.pop will return nil
  end
  it 'should render a json message' # change this title to be something descriptive
    get :next #add params if applicable
    ActiveSupport::JSON.parse(response.body).should == {"msg"=>"No more Items in the Queue to 
retrieve..!!"} 
  end
end

Fred

    def next
        @receiver = @queue.pop()
        unless @receiver.nil?
          respond_with(@receiver)
        else
          render :json =>{"msg"=>"No more Items in the Queue to
retrieve..!!"}
        end
      end

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f23dbe1d-7168-4543-993b-0a2fa3f70b41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

You want to use paperclip for handling files and rails 4 as framework. All you need is the implementation for uploading multiple images.

There are many javascript plugins out there if you want go for JS way. Following are some easy to integrate plugins:

  1. jQuery File Upload => http://blueimp.github.io/jQuery-File-Upload/
  2. Plupload => http://www.plupload.com/

Or you can use plupload_rails3 gem https://github.com/codeodor/plupload-rails3.

Which is easy to integrate and usages Plupload gem.

Following are some links which may help you:

  1. http://5minutenpause.com/blog/2013/09/04/multiple-file-upload-with-jquery-rails-4-and-paperclip/
  2. http://ikbenbitterzoet.com/2010/09/18/multiple-file-upload-with-plupload.html
  3. http://spin.atomicobject.com/2011/10/31/upload-files-directly-to-s3-with-plupload-rails-and-paperclip/
  4. http://amgrade.com/blogs/thoughts/multiple-files-upload-rails

Regards,
Lauree
(Ruby on Rails Developer)



On Tuesday, April 29, 2014 2:40:37 AM UTC+5:30, Eugeniu Tambur wrote:
Hello, I'm learning rails and creating a small project, 
Someone could tell me how can I upload multiple images with paperclip in rails 4? 

Thank you very much, I hope someone can help me. 
Greetings.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/aee138a6-0112-4fee-8168-2781bd420666%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Tuesday, April 29, 2014 4:27:22 PM UTC-4, Ruby-Forum.com User wrote:
Hi There,
I am running an app with an AS400 for the database. in the development
environment I am getting the following error: 37000 (-104) [IBM][iSeries
Access ODBC Driver][DB2 UDB]SQL0104 - Token ` was not valid. Valid
tokens: ( TABLE LATERAL <IDENTIFIER>.

/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-odbc-adapter-2.0/lib/active_record/connection_adapters/odbc_adapter.rb:1519:in
`rescue in select'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-odbc-adapter-2.0/lib/active_record/connection_adapters/odbc_adapter.rb:1514:in
`select'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-odbc-adapter-2.0/lib/active_record/connection_adapters/odbc_adapter.rb:770:in
`select_all'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.10/lib/active_record/base.rb:665:in
`find_by_sql'
/var/www/onlineordering.coastalpet.com/app/models/item.rb:183:in
`filter_categories'
/var/www/onlineordering.coastalpet.com/app/controllers/products_controller.rb:6:in
`index'

here is the revelvant code for that above two pages:

/var/www/onlineordering.coastalpet.com/app/models/item.rb:183:in
`filter_categories' =

s = Item.find_by_sql [sql, upc_rule, query_account_number, upc_rule,
query_account_number, upc_rule, query_account_number, upc_rule,
query_account_number, upc_rule, query_account_number, upc_rule,
query_account_number, upc_rule, query_account_number]


/var/www/onlineordering.coastalpet.com/app/controllers/products_controller.rb:6:in
`index' = @categories = Item.filter_categories(session[:upc_rule],
session[:query_account_number])

I am looking for thoughts on the error Token ` was not valid. Valid
tokens: ( TABLE LATERAL <IDENTIFIER>. as I am not familiar with this
error.

--
Posted via http://www.ruby-forum.com/.

Wow! never thought i'd see an as400 question in this forum.  for the record, the as400 is the model name of the server, the database you are using is DB2.  the message you are getting basically means you are passing an invalid table name.  If I remember correctly (and it's been a long time), it's in the format of DDDDD.TTTTT where DDDDD is the database name and TTTTT is the table name.  The problem is I have no idea where the error is popping up.  It could be in the database adapter (the gem you are using to communicate with the database) or it could be in IBM's ODBC.  

I've never used Rails with IBM's technology.  I think the best place to look for resources on this is the rubyforge project at the following:

https://rubyforge.org/projects/rubyibm/
 

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/11f886db-f734-403d-965e-647cbae42827%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Tue, Apr 29, 2014 at 12:39 PM, Joy Ganguly <tech.tutorial4u@gmail.com> wrote:

> The field "desc" should contain "<b>Bold</b>" rather than "desc"=>"Bold". I
> have checked the markup and javascript but there is no problem.

I just set up a quick testbed to try this editor, and my opinion is that
it doesn't work, period -- formatted text is created in the browser but
not sent to the server on submit.

Bummer because it does have an attractive UI, but I just don't have
the time today to debug the problem.

Definitely not a Rails issue, though.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yBZxKwe1-rWS6Cuw3BF2yR4GDWtGt8sqiz93CxvSpaOkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi There,
I am running an app with an AS400 for the database. in the development
environment I am getting the following error: 37000 (-104) [IBM][iSeries
Access ODBC Driver][DB2 UDB]SQL0104 - Token ` was not valid. Valid
tokens: ( TABLE LATERAL <IDENTIFIER>.

/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-odbc-adapter-2.0/lib/active_record/connection_adapters/odbc_adapter.rb:1519:in
`rescue in select'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-odbc-adapter-2.0/lib/active_record/connection_adapters/odbc_adapter.rb:1514:in
`select'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-odbc-adapter-2.0/lib/active_record/connection_adapters/odbc_adapter.rb:770:in
`select_all'
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/activerecord-2.3.10/lib/active_record/base.rb:665:in
`find_by_sql'
/var/www/onlineordering.coastalpet.com/app/models/item.rb:183:in
`filter_categories'
/var/www/onlineordering.coastalpet.com/app/controllers/products_controller.rb:6:in
`index'

here is the revelvant code for that above two pages:

/var/www/onlineordering.coastalpet.com/app/models/item.rb:183:in
`filter_categories' =

s = Item.find_by_sql [sql, upc_rule, query_account_number, upc_rule,
query_account_number, upc_rule, query_account_number, upc_rule,
query_account_number, upc_rule, query_account_number, upc_rule,
query_account_number, upc_rule, query_account_number]


/var/www/onlineordering.coastalpet.com/app/controllers/products_controller.rb:6:in
`index' = @categories = Item.filter_categories(session[:upc_rule],
session[:query_account_number])

I am looking for thoughts on the error Token ` was not valid. Valid
tokens: ( TABLE LATERAL <IDENTIFIER>. as I am not familiar with this
error.

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d1f4fb8140a58aed6c668a166c39b719%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Apr 29, 2014, at 1:39 PM, Joy Ganguly <tech.tutorial4u@gmail.com> wrote:

> The field "desc" should contain "<b>Bold</b>" rather than "desc"=>"Bold". I have checked the markup and javascript but there is no problem.

If it's not being submitted to the server, then there is a problem with the markup or javascript. Quickest thing to do is use your browser debugging tools to see what the browser is actually sending to the server. Then you'll at least know whether the tags are stripped in the browser or the server.

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/22B24BFA-2C24-4AC3-B83E-B24280DF797A%40elevated-dev.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hassan Schroeder:

The field "desc" should contain "<b>Bold</b>" rather than
"desc"=>"Bold". I have checked the markup and javascript but there is no problem.

Colin Law:

There is no html tag at all only the plain text.


On Monday, April 28, 2014 9:12:05 PM UTC+5:30, Hassan Schroeder wrote:
On Mon, Apr 28, 2014 at 8:32 AM, Joy Ganguly <tech.tu...@gmail.com> wrote:

>  Parameters: {"utf8"=>"✓",
> "authenticity_token"=>"P7fHbeUQlcCaV3MK2g+Qu6h/CmhM8+g6SOHzqjEuoPI=",
> "request"=>{"title"=>"Title", "date"=>"2014/4/30", "time"=>"4:15 PM",
> "desc"=>"Bold"}, "_wysihtml5_mode"=>"1", "commit"=>"Add Request"}

What field is supposed to have markup in it?

In any case, if markup is not being submitted as you expect, you'll
need to make sure your page markup is valid, there's no JavaScript
errors, and the configuration for this plugin is correct, assuming there
is some (I've never used it).

Worst case I'd create a minimal test project to see if you could get it
to work at all. If that doesn't work, send the link to it.

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e864f4ba-5b04-4118-89f3-cb320ff877b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hello All,

I'm currently working in the medical equipment research and development
industry and I'm looking to switch industries to become a Rails
developer. I've been focusing on getting to know Ruby for the past
couple months and am feeling fairly comfortable with it. I want to start
moving on and start on Rails now, but want some people's opinions on
where to start.

How'd you all get started?
Did any of you switch industries in to Rails development?

I'd be very interested in talking to someone who did switch industries
successfully after studying Ruby/Rails independently. I'm a quick
learner so picking up all these languages isn't a problem and just takes
time, but I would really like some advice on how to reach that end goal
of actually landing a job as a Rails developer (freelance work, where I
should be before I START looking for freelance jobs, developing a Rails
portfolio, etc.).

Seeing someone else's Rails portfolio would be a huge help!

Thanks in advance!

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/676bc7d71ca05d99b73ce326f3d9c8b1%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Monday, April 28, 2014 8:32:17 PM UTC-4, Ruby-Forum.com User wrote:
Thank you very much, It looks like you're right. All these problems
began to occur after I moved the app to production using
passenger/nginx. I used google version because that was the last
version. I did not know this was being included twice by jquery_ujs.js.
In fact, I was able get rid of some of the error by doing some changes
after your suggestion.

To tell you the truth, the problem is not so much programming but
understanding the concepts of about rails architecture and its modules.
This for me is the hard part. I am still at the beginning of the curve,
but I hope with your suggestion and I will get there.

One more thing:

Do you recommend to testing locally with nginx my rails app? I believe
it will bring the closest scenario to the one I am using i production,
specially if I can debug to better understand the errors.

Rod

mike2r wrote in post #1144331:
> On Sunday, April 27, 2014 5:12:41 PM UTC-4, Ruby-Forum.com User wrote:
>>   def index
>>
>>     end
>>       end
>> >> event.preventDefault() instead. jquery.js:75
>> >> <html>
>> >> --
>> > I may have a better idea of exactly what's happening when I see the
>> Posted via http://www.ruby-forum.com/.
>>
>
> The statement causing the problem is:
>
> layout 'home'
>
> Rails uses layouts and templates in its view rendering system (plus
> other
> things, but let's start with that).  The default layout is
> application.html.erb.  With the above statement, you've overridden the
> default.  I'm assuming that you were having issues because the default
> template for this action would be index.html.erb and you wanted it to be
> home.html.erb.  You would accomplish that by 1) get rid of the layout
> statement and 2) insert the following statement at the end of the index
> action:
>
>  render template: 'home'
>
> You will have some other issues when you do this.  The layout is
> intended
> to be the overall framework and, at a minimum, includes the following:
> <!DOCTYPE html>
> <html>
> .
> .
> </html>
>
> The contents of the template (home.html.erb) will be inserted where you
> see
> the word yield in the application layout.  In your case, you've defined
> the
> doctype and html tag in both the application layout and the template
> which
> will result in the html tag being defined twice which is invalid html.
>  Again, I refer you to the guide linked above.
>
> You're going to have a few other issues.  You are separately loading the
> jquery and jquery-ui files from google.  Once you have this working
> correctly, that will result in those files being loaded twice and
> potentially two different versions:  the rails version and the version
> you're loading from google.
>
> I also encourage you to go through a good tutorial such as
> railstutorial.org.  You seem to have a pretty good foundation in ruby,
> so I
> don't think it would take you long to go through the tutorial.  You are
> doing a lot of things in your controller that 1) you don't need to do if
> you work with Rails conventions and 2) some of them belong in a model.

--
Posted via http://www.ruby-forum.com/.

There's generally three levels of testing in Rails:

1) Unit testing:  this is part of the Rails architecture and doesn't depend on a browser.  I use rspec/capybara, others use the standard test unit supplied with Rails, etc.  This is basically automated testing and does a very good job of testing controllers/models to insure the right things are happening with respect to information produced (or not produced), retrieved and saved correctly, etc.  

2) Visual testing which is testing in the browser.  When you're writing views, for example, it's pretty much necessary to see things in a browser.  In this case, I always test in development mode because changes you make are automatically reflected on a refresh.  This is accomplished by having sprockets and the pipeline live.  In production, everything has to be pre-compiled and that would significantly slow development time.

3) Once you have developed the piece or application that you are now ready to show the client/user, you should test it in the nginx/passenger production environment (or whatever environment the application will be running in in production).  As you have seen above, things can happen and you should always test this before releasing a piece of your work to be reviewed.

I should note you can use nginx/passenger and run it in the development environment.  I sometimes do this, sometimes I just use WEBrick (rails server).  

This is just my opinion, there a lot of different ways to do this but however you do it, and whatever tools best fit you, it is important that you test.

The railstutorial.org I referred to in the above posts is free and the tutorial largely focuses on the rails architecture and models.  It takes you through the construction of a basic twitter-like site step by step, explaining the concepts as you go.  I think there's one chapter on basic ruby you could probably skip.  

mike

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/50290595-6e3c-43e0-b4bf-e74e65aea369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi,

I have written some controller methods and testing it using Rspec. I am
just learning the Rspec by testing those methods. I need some hints on
how to do it. I have the below method in my QueueItemsController and I
need to test it. So how do I proceed. Please help. I read the tutorials
and other online forums but it seems to be confusing at some point.

def next
@receiver = @queue.pop()
unless @receiver.nil?
respond_with(@receiver)
else
render :json =>{"msg"=>"No more Items in the Queue to
retrieve..!!"}
end
end

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c6fac89b7c2cd816ea18363739cecad5%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi,

On Monday, April 28, 2014 9:31:06 PM UTC+2, Matt Jones wrote:

This doesn't make any sense to me - if I request a ReportsSubject object from the database directly (via `find`, for instance), what do I get if I ask for its subject? What would the reports_subjects table even *store*? A bare `subject_id` would be insufficient since without a class_name it's unclear what table that ID refers to.

A "report subject" (a row in the join table) doesn't carry any semantics without the report, which has further information about required details. A report also only ever has a single type of subject, so IMO it would not make sense to store a couple thousand repetitions of an STI name (although note that the subjects are not all part of a single STI hierarchy!) in a column that adds no information at all to the system.
 
And that's not even considering what should happen when this sort of code runs:

Report.joins(:subjects).where(name: 'hey wait WHAT TABLE IS THIS EVEN QUERYING')

This is not functionally different from having the polymorphic subject type specified in the join table.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/46a7c7a0-8bc1-4956-ad84-cbbd85d5b19b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Alright, I might have exaggerated.
Hey Eugenio Tambur, if you took my response as Jordon did, pardon me. I didn't mean to be an asshat as he says(I'm a cool guy), but, I still reckon that by trying to find out the solution of a problem or learning anything new on your own first, will definitely be one of the best way to enhance/improve your skills/knowledge. 




On Tue, Apr 29, 2014 at 4:26 PM, Jordon Bedwell <envygeeks@gmail.com> wrote:
On Tue, Apr 29, 2014 at 1:20 AM, Mateus Couto <mateux@gmail.com> wrote:
> C'mon, mate.
> Have you at least tried to google it?
> Apparently no.
> I'll give you a hand with that
> http://bit.ly/1mUetID

Less time being an asshat and more time learning what the word "help"
means.  And yes, I will admit by all technicality you did "help" but
by all semantics you did not help by the standards of which make you a
human.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAM5XQnz_W330GKkqWsXAtywJHs1roPHM2CfbD0Gr%2BisjPfT_OA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOEz2q9CqDZP0oVNqKRVAekVeSKAkRmbTFKYbkQ9WMcf1qq8jA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Monday, April 28, 2014

On Tue, Apr 29, 2014 at 1:20 AM, Mateus Couto <mateux@gmail.com> wrote:
> C'mon, mate.
> Have you at least tried to google it?
> Apparently no.
> I'll give you a hand with that
> http://bit.ly/1mUetID

Less time being an asshat and more time learning what the word "help"
means. And yes, I will admit by all technicality you did "help" but
by all semantics you did not help by the standards of which make you a
human.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAM5XQnz_W330GKkqWsXAtywJHs1roPHM2CfbD0Gr%2BisjPfT_OA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

C'mon, mate.
Have you at least tried to google it?
Apparently no.
I'll give you a hand with that


Sent from my iPhone

On 29 Apr 2014, at 4:08 pm, Eugeniu Tambur <eugeniu.rtj@gmail.com> wrote:

Hello, I'm learning rails and creating a small project, 
Someone could tell me how can I upload multiple images with paperclip in rails 4? 

Thank you very much, I hope someone can help me. 
Greetings.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/57c4bc33-12ae-4e05-abdf-452b0a220164%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Frederick Cheung wrote in post #1144297:
> On Monday, April 28, 2014 11:16:57 AM UTC+1, Ruby-Forum.com User wrote:
>> # describe UsersHelper do
>> which example should I add? The example given in comment form, that
>> should I add in " users_helper_spec.rb " file?
>>
>>
> That depends entirely on what your code does. Typically you would have a
> group of specs testing various cases for each of the methods in
> UsersHelper.
>
> If you're not going to write any specs then you can just delete the
> file.
>
> Fred

Thank you very much for your reply.

Kind regards.

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c4066296362170b3adf182eec5249f92%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

The free download offer was for an advance edition of the book. The free offer expired in November 2013 (!).

The book has been updated for Rails 4.1 and it is available (with a number of other tutorials) from the RailsApps project:
http://railsapps.github.io/
only as part of a monthly subscription.

I'm sorry that it's not obvious that the download offer was for a limited duration in November 2013. The title of the email announcement "free today" refers to the day the email announcement was sent to this Google Group. In retrospect, I should have said "free on November 27, 2013." Sorry if anyone is disappointed.

-- Daniel Kehoe, author of 'Learn Ruby on Rails'

On Monday, April 28, 2014 7:16:16 PM UTC-7, Colin Stodd wrote:
I subscribed, still unsure on how to get the free download...

On Wednesday, November 27, 2013 10:28:30 AM UTC-5, Daniel Kehoe wrote:
I'm offering the advance edition of my new book for free.

Here's the link for Learn Ruby on Rails:


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ab839c9f-710e-4c16-9e71-75eec5b4f092%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I subscribed, still unsure on how to get the free download...

On Wednesday, November 27, 2013 10:28:30 AM UTC-5, Daniel Kehoe wrote:
I'm offering the advance edition of my new book for free.

Here's the link for Learn Ruby on Rails:


My book is aimed at beginners, as a "prequel," as a first step before further study.

Start with 'Learn Ruby on Rails' and you'll be well-prepared for other excellent books, such as


-- 

  Daniel Kehoe

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ce14b51e-1ede-4b7a-8444-a15ef01347b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I'm looking forward to reading it this week!  Really appreciate you posting this!

On Wednesday, November 27, 2013 10:28:30 AM UTC-5, Daniel Kehoe wrote:
I'm offering the advance edition of my new book for free.

Here's the link for Learn Ruby on Rails:


My book is aimed at beginners, as a "prequel," as a first step before further study.

Start with 'Learn Ruby on Rails' and you'll be well-prepared for other excellent books, such as


-- 

  Daniel Kehoe

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3dc75081-316b-444e-976d-7b008a9b376f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I should first mention that I'm new to rails, but I updated to Ubuntu 14 today and I cloned my latest project from Github after installation.  Everything seems to be working just as my last push, however my project is
styled with Bootstrap 2... but it should be 3.1.1.

I am not using the direct files in the stylesheets folder, instead I created my own custom.css.scss and did @import "boostrap";.  I also included the these in my application.js file. 

//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require_tree .


my gemfile has:

source 'https://rubygems.org'

gem 'rails', '3.2.16'
gem 'bootstrap-sass'
gem 'sass-rails', '3.2.5'

gem 'bootstrap'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate'
gem 'jquery-rails', '2.0.2'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails'
  gem 'pry-rails'
  gem 'pry-theme'

end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

group :test do
  gem 'capybara'
  gem 'factory_girl_rails', '4.1.0'
  gem 'cucumber-rails', '1.2.1', :require => false
  gem 'database_cleaner', '0.7.0'
  # gem 'launchy', '2.1.0'
  # gem 'rb-fsevent', '0.9.1', :require => false
  # gem 'growl', '1.0.3'
end

group :production do
  gem 'pg', '0.12.2'
end



Any ideas on what might be causing this?....

Thanks in advance for any feedback you may have!

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/70aaf86a-0233-491d-8dd6-6a9da842f5b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.