David Pell

Joined

90 Experience
0 Lessons Completed
0 Questions Solved

Activity

I have no audio from 10:05 to 11:05. Is that an issue with the screencast or just a particularly reflective section? :)

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

I'm having trouble at the step of installing Ruby with rbenv. rbenv installed fine but when I run rbenv install 2.2.0 it hangs (not really hangs, I can see stuff happening if I use the --verbose flag), and then I get the following:



deployer@http01-staging:~$ rbenv install 2.2.0

Downloading ruby-2.2.0.tar.gz...

-> http://dqw8nmjcqpjn7.cloudfront.net/7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc

Installing ruby-2.2.0...

BUILD FAILED (Ubuntu 14.04 using ruby-build 20150116-6-g7f1d8df)

Inspect or clean up the working tree at /tmp/ruby-build.20150122204243.31132

Results logged to /tmp/ruby-build.20150122204243.31132.log

Last 10 log lines:

make[3]: Leaving directory `/tmp/ruby-build.20150122204243.31132/ruby-2.2.0/ext/fiddle/libffi-3.2.1'

linking shared-object fiddle.so

/usr/bin/ld: ./libffi-3.2.1/.libs/libffi.a(raw_api.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC

./libffi-3.2.1/.libs/libffi.a: error adding symbols: Bad value

collect2: error: ld returned 1 exit status

make[2]: *** [../../.ext/x86_64-linux/fiddle.so] Error 1

make[2]: Leaving directory `/tmp/ruby-build.20150122204243.31132/ruby-2.2.0/ext/fiddle'

make[1]: *** [ext/fiddle/all] Error 2

make[1]: Leaving directory `/tmp/ruby-build.20150122204243.31132/ruby-2.2.0'

make: *** [build-ext] Error 2

Any suggestions??

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

I'm trying to install Ruby 2.2 on my staging server through rbenv and it's just hanging:



deployer@http01-staging:~$ rbenv install 2.2.0
Downloading ruby-2.2.0.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/7671e394abfb5d262fbcd3b27a71bf78737c7e9347fa21c39e58b0bb9c4840fc
Installing ruby-2.2.0...

Any ideas??

* UPDATE*
It finally failed and I got the following error messages:


BUILD FAILED (Ubuntu 14.04 using ruby-build 20150116-6-g7f1d8df)

Inspect or clean up the working tree at /tmp/ruby-build.20150122190357.31648
Results logged to /tmp/ruby-build.20150122190357.31648.log

Last 10 log lines:
make[3]: Leaving directory /tmp/ruby-build.20150122190357.31648/ruby-2.2.0/ext/fiddle/libffi-3.2.1'<br>linking shared-object fiddle.so<br>/usr/bin/ld: ./libffi-3.2.1/.libs/libffi.a(raw_api.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC
./libffi-3.2.1/.libs/libffi.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [../../.ext/x86_64-linux/fiddle.so] Error 1
make[2]: Leaving directory /tmp/ruby-build.20150122190357.31648/ruby-2.2.0/ext/fiddle'<br>make[1]: *** [ext/fiddle/all] Error 2<br>make[1]: Leaving directory/tmp/ruby-build.20150122190357.31648/ruby-2.2.0'
make: *** [build-ext] Error 2

Posted in Button Loading Animations with jQuery UJS Discussion

I copied the exact same code but the UJS still isn't working for me. Here is the HTML:


<button class="btn btn-lg btn-success pull-right" data-disable-with="Processing..." id="finish-and-pay-button" name="button" type="button">Finish and Pay</button>

EDIT

I think I finally found a solution that works for my use case. It involves using a link with remote: true and disable_with on the data option. It looks like this:


= link_to "Finish and Pay", pay_job_path(@job), method: :post, id: 'finish-and-pay-button', class: "btn btn-lg btn-success pull-right", remote: true, data: {disable_with: "Processing..."}

Posted in Button Loading Animations with jQuery UJS Discussion

Ahh maybe that's it. My use case is not technically a form. I have a box for entering a promo code within my form but I couldn't make it a form-within-a-form because the submit button would submit the main form. I just have an input with a button that is being listened to for a click event that generates an Ajax request that validates the input. Would that be the problem?

Posted in Button Loading Animations with jQuery UJS Discussion

Note yours does have type = "submit" whereas @Marklar and I were wondering about buttons with type="button". Do you think that could be the problem? The top 3 lines of my application.js look like this:


//= require jquery
//= require jquery_ujs
//= require jquery-1.11.0.min.js

Posted in Button Loading Animations with jQuery UJS Discussion

I am using <button>. Here is the HTML:

<button class="btn btn-primary" data-disable-with="Checking..." data-discount-submit="1" id="job-code-button" type="button">Apply</button>

Posted in Button Loading Animations with jQuery UJS Discussion

Did you ever figure this out? I'm also not having success with a button that has the 'button' type

Posted in Debugging With BetterErrors Discussion

cool! I had been using `binding.pry` in my controllers to debug like this but it's definitely faster if I don't have to add and remove that line every time. thanks!

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.