Note that there are some explanatory texts on larger screens.

plurals
  1. POpaperclip file not uploading
    text
    copied!<p>I can't manage to use paperclip for a file upload. I'm following this tutorial</p> <p><a href="http://larsgebhardt.de/parse-xml-with-ruby-on-rails-paperclip-and-nokogiri/" rel="nofollow">http://larsgebhardt.de/parse-xml-with-ruby-on-rails-paperclip-and-nokogiri/</a></p> <p>This is what I did :</p> <pre><code>route.rb: resources :users do resources :rides do resources :comments end resources :challenges do get "accept" post 'accept' end end ... validates :gpx, presence: true rides.rb: require 'nokogiri' class Ride &lt; ActiveRecord::Base belongs_to :user has_many :comments, dependent: :destroy has_many :challenges # Tracksegments has_many :tracksegments, :dependent =&gt; :destroy has_many :points, :through =&gt; :tracksegments has_attached_file :gpx create_rides.rb add_attachment :rides, :gpx rides/new.html.erb &lt;h1&gt;New Ride&lt;/h1&gt; &lt;%= form_for [@user,@ride] do |f| %&gt; &lt;div&gt; &lt;%= f.label :name, :class =&gt; 'control-label' %&gt; &lt;div&gt; &lt;%= f.text_field :name, :class =&gt; 'text_field' %&gt; &lt;/div&gt; &lt;/div&gt; &lt;div&gt; &lt;%= f.label :gpx, :class =&gt; 'control-label' %&gt; &lt;div&gt; &lt;%= f.file_field :gpx %&gt; &lt;/div&gt; &lt;/div&gt; &lt;div&gt; &lt;%= f.submit %&gt; &lt;/div&gt; &lt;% end %&gt; &lt;div&gt; &lt;%= link_to 'Back', user_rides_path %&gt; &lt;/div&gt; </code></pre> <p>Everything renders well but the file is not uploaded. The page is stuck due to the present validation set in the model.rb. What is wrong?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload