Ruby Rails Sample error
I'm wondering what Andreas means when he says "it's because you don't have a field with an external_id of status. Then field is null and you can't do field['config']". I'm sorry but I don't understand that statement from the link below. I'm getting that same error when trying to create a new lead in the Podio_Rails_sample. I get a NoMethodError and this message: undefined method '[]' for nil:nilClass .
I haven't change anything on the sample app. Please help if you can.
Thank you.
-
Official comment
Hi Thomas,
If you haven't changed anything in the sample app, then that's the problem. As you can read out of the readme, you must install the "Leads" app pack and update the app_id and space_id in the sample code for the sample to work.
If you don't do this, there will be no app to update and you will get the error above.
Comment actions -
the 'require' error I posted earlier today is on my windows 7 machine.
On my Ubuntu os, when I run the 'rails server' command I get this error:
Could not find json-1.7.5 in any of the sources
Runbundle install
to install missing gems.- I've tried everything I can think of including of course googling it to see if I could find the answer.
- tried to install json 1.7.5 manually
- tried to put json 1.7.5 in gemfile and run bundler and it doesn't work.
- The error below is what I receive when I ran 'bundle Install' like the message says to do.
:~/podio_rails_sample$ bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching version metadata from http://rubygems.org/...
Fetching dependency metadata from http://rubygems.org/..
Using rake 0.9.2.2
Using i18n 0.6.1
Using multi_json 1.3.6
Using activesupport 3.2.8
Using builder 3.0.0
Using activemodel 3.2.8
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.1
Using rack-cache 1.2
Using rack-test 0.6.1
Using hike 1.2.1
Using tilt 1.3.3
Using sprockets 2.1.3
Using actionpack 3.2.8
Using mime-types 1.19
Using polyglot 0.3.3
Using treetop 1.4.10
Using mail 2.4.4
Using actionmailer 3.2.8
Using arel 3.0.2
Using tzinfo 0.3.33
Using activerecord 3.2.8
Using activeresource 3.2.8
Using addressable 2.3.2
Using ansi 1.4.3
Using coffee-script-source 1.3.3
Using execjs 1.4.0
Using coffee-script 2.2.0
Using rack-ssl 1.3.2
Installing json 1.7.5 with native extensionsGem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/new/.rbenv/versions/2.2.2/bin/ruby -r ./siteconf20150623-2970-13matp0.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
../fbuffer/fbuffer.h:179:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
../fbuffer/fbuffer.h:179:20: warning: initialization makes integer from pointer without a cast [enabled by default]
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
In file included from generator.c:2:0:
generator.c: In function ‘cState_aref’:
generator.h:75:27: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
JSON_Generator_State state; \
^
generator.c:632:5: note: in expansion of macro ‘GET_STATE’
GET_STATE(self);
^
make: ** [generator.o] Error 1make failed, exit code 2
Gem files will remain installed in /home/new/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/json-1.7.5 for inspection.
Results logged to /home/new/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/json-1.7.5/gem_make.out
An error occurred while installing json (1.7.5), and Bundler cannot continue.
Make sure thatgem install json -v '1.7.5'
succeeds before bundling.
Please sign in to leave a comment.
Comments
5 comments