Railsに関する質問です。

下記の手順を踏んだところ、6番のようなエラーが発生しました。
具体的な解決方法をご教授下さい。
下記はバージョン情報です。
Ruby:1.8.7
Rails:2.3.8
OS:mac os x 10.6.8
コメント欄にgem listを付記します。ご参照下さい。

1.activerecord-salesforce-adapterをインストール
$ gem install activerecord-activesalesforce-adapter

2.rails testでtestアプリケーションを作成
$ rails test

3.ruby /script/serverで既読を確認
$cd test
$ruby script/server

4./config/enviroment.rbを下記のように編集
Rails::Initializer.run do |config|
config.time_zone = 'UTC'
require 'activesalesforce'
end

5./config/database.ymlを下記のように編集
development:
adapter: activesalesforce
url: https://www.salesforce.com
username: <実際のユーザーアカウントを入力>
password: <実際のパスワードを入力>

6.3同様にサーバーを起動すると、エラーが発生
$ ruby script/server
`gem_original_require': no such file to load -- activesalesforce (MissingSourceFile)
詳細なエラーはコメント欄に記載しました。

最後まで読んで頂き、ありがとうございます。
人力検索とtwitterを通じたプログラミングの先生も合わせて募集しております。
興味のある方は、コメント欄で詳細をご確認下さい。

回答の条件
  • 1人5回まで
  • 登録:
  • 終了:2011/09/18 12:20:07
※ 有料アンケート・ポイント付き質問機能は2023年2月28日に終了しました。

ベストアンサー

id:takano32 No.3

回答回数58ベストアンサー獲得回数5

ポイント300pt

まとめ

1. gem install bundler でGemfilesとかあるディレクトリで bundle install

2. よしなに bundler がいろいろいれてくれる

3. bundler環境下で実行

$ bundle exec ruby script/server

id:puriketu99

回答ありがとうございました。

詳細はコメント欄を参照してください。

2011/09/18 12:20:38

その他の回答2件)

id:m-a-h-i-r-o No.1

回答回数5ベストアンサー獲得回数1

ふたを閉めて開けるとなおっていることがあります。

id:pettann No.2

回答回数128ベストアンサー獲得回数17

上の人の様にふたを閉めたり、

再起動したら直る事がありますよ!

id:takano32 No.3

回答回数58ベストアンサー獲得回数5ここでベストアンサー

ポイント300pt

まとめ

1. gem install bundler でGemfilesとかあるディレクトリで bundle install

2. よしなに bundler がいろいろいれてくれる

3. bundler環境下で実行

$ bundle exec ruby script/server

id:puriketu99

回答ありがとうございました。

詳細はコメント欄を参照してください。

2011/09/18 12:20:38
  • id:puriketu99
    誤字がありました。
    ☓既読
    ◯起動

    下記はgem listです。
    *** LOCAL GEMS ***

    aasm (2.2.0)
    actionmailer (3.1.0, 2.3.8, 2.3.5)
    actionpack (3.1.0, 2.3.8, 2.3.5)
    activemodel (3.1.0)
    activerecord (3.1.0, 2.3.8, 2.3.5)
    activerecord-activesalesforce-adapter (2.0.0)
    activeresource (3.1.0, 2.3.8, 2.3.5)
    activesupport (3.1.0, 2.3.8, 2.3.5)
    arel (2.2.1)
    bcrypt-ruby (3.0.1)
    builder (3.0.0)
    bundler (1.0.18)
    erubis (2.7.0)
    faker (0.3.1)
    hike (1.2.1)
    i18n (0.6.0)
    json (1.5.4)
    machinist (1.0.6)
    mail (2.3.0)
    mime-types (1.16)
    multi_json (1.0.3)
    multipart-post (1.1.3)
    polyglot (0.3.2)
    rack (1.3.2, 1.1.2, 1.0.1)
    rack-cache (1.0.3)
    rack-mount (0.8.3)
    rack-ssl (1.3.2)
    rack-test (0.6.1)
    rails (2.3.8)
    railties (3.1.0)
    rake (0.9.2)
    rdoc (3.9.4)
    sprockets (2.0.0)
    thor (0.14.6)
    tilt (1.3.3)
    treetop (1.4.10)
    tzinfo (0.3.29)
  • id:puriketu99
    => Booting WEBrick
    => Rails 2.3.8 application starting on http://0.0.0.0:3000
    /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- activesalesforce (MissingSourceFile)
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
    from /Users/prk29/test/config/test/config/environment.rb:41
    from /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:111:in `run'
    from /Users/prk29/test/config/test/config/environment.rb:9
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
    from /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:84
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from script/server:3

    shell returned 1
  • id:puriketu99
    プログラミングの師匠を募集しています

    師匠達(現在7名):http://twitter.com/#!/puriketu99/prk2master

    下記に関する私の人力検索上の質問をTwitterのリプライで通知しようと思っています。
    通知されることに差し支えがなければ、リプライをください。
    http://twitter.com/#!/puriketu99
    得意分野や何か一言ありましたら、書き添えてご連絡頂けると幸いです。

    ・Google App Engine for python
    ・python
    ・JavaScript
    ・PhoneGap(iPhone,Android)
    ・Debian/Linux
    ・Top Coder
    ・build bot
    ・Mac OS X
    ・各種API、ライブラリ
    ・その他周辺事項

    補足
    ・全てに精通している必要はありません
    ・もし、途中で通知がご面倒になった場合は、一言おっしゃっていただければ通知をしないようにします
    ・気が向いたときに回答していただければ充分です
    ・開発をしているときは高い頻度で質問することがあります
    ・初歩的な質問が多いです(http://q.hatena.ne.jp/puriketu99/questionlist)
    ・なるべく、答えを知っている人であればすぐに答えられるような質問をするようにしています
    ・何か不明点があれば、Twitterやコメント欄でお問い合わせください
  • id:takano32
    gem install bundler でGemfilesとかあるディレクトリで bundle install するとどうなりますか。
  • id:puriketu99
    回答ありがとうございます。
    下記の手順を実行しましたが、同じエラーがでています。
    enviroment.rbからrequire "activesalesforce"したときにエラーが出ているようですが、これをrequire "activerecord-activesalesforce-adapter"としても同じでした。

    1.下記のGemfileをtestプロジェクトのルートディレクトリに配置
    source "http://rubygems.org"
    gem 'activerecord-activesalesforce-adapter'
    gem 'activesalesforce'

    2.testプロジェクトでbundle installを実行

    % bundle install gem_dir

    Fetching source index for http://rubygems.org/
    Fetching source index for http://rubygems.org/

    Installing rake (0.9.2)
    Installing multi_json (1.0.3)
    Installing activesupport (3.1.0)
    Installing bcrypt-ruby (3.0.1) with native extensions
    Installing builder (3.0.0)
    Installing i18n (0.6.0)
    Installing activemodel (3.1.0)
    Installing erubis (2.7.0)
    Installing rack (1.3.3)
    Installing rack-cache (1.0.3)
    Installing rack-mount (0.8.3)
    Installing rack-test (0.6.1)
    Installing hike (1.2.1)
    Installing tilt (1.3.3)
    Installing sprockets (2.0.0)
    Installing actionpack (3.1.0)
    Installing mime-types (1.16)
    Installing polyglot (0.3.2)
    Installing treetop (1.4.10)
    Installing mail (2.3.0)
    Installing actionmailer (3.1.0)
    Installing arel (2.2.1)
    Installing tzinfo (0.3.29)
    Installing activerecord (3.1.0)
    Installing activeresource (3.1.0)
    Using bundler (1.0.18)
    Installing rack-ssl (1.3.2)
    Installing rdoc (3.9.4)
    Installing thor (0.14.6)
    Installing railties (3.1.0)
    Installing rails (3.1.0)
    Installing activerecord-activesalesforce-adapter (2.0.0)
    Installing activesalesforce (1.1.6)
    Your bundle is complete! It was installed into ./gem_dir
    The path argument to `bundle install` is deprecated. It will be removed in version 1.1. Please use `bundle install --path gem_dir` instead.
  • id:takano32
    あまり解決になるかわからないのですが、

    The path argument to `bundle install` is deprecated. It will be removed in version 1.1. Please use `bundle install --path gem_dir` instead.

    と言われているので、もっかい

    bundle install --path gem_dir

    するとどうなりますか
  • id:takano32
    あと。

    $ bundle exec ruby script/server

    で bundler 環境下で実行です。
  • id:puriketu99
    >$ bundle exec ruby script/server
    >で bundler 環境下で実行です。

    おお!!!!素晴らしい!動きました!
    ありがとうございます。大変助かりました。
    ベストアンサー進呈したいので、何か適当に書いて回答してもらえるとありがたいです。
    ちなみに、--pathをつけて実行した場合は、全部USINGだったので、関連はなさそうです。
  • id:takano32
    ごめん、回答欄のつもりでコメント欄に書いてたwww

この質問への反応(ブックマークコメント)

「あの人に答えてほしい」「この質問はあの人が答えられそう」というときに、回答リクエストを送ってみてましょう。

これ以上回答リクエストを送信することはできません。制限について

回答リクエストを送信したユーザーはいません