title: Lion Server, Profilemanager, RVM and Rails not work together
body: <p>Lion Server is absurd. On a Mac, I ran the installation and setup of Lion Server 10.7.3 then I installed rvm, Ruby 1.9.3 and Rails 3.2.3.</p>
  
  <p>On a Mac it worked perfectly while in the second Mac is not working and I get in the log devicemgr:</p>
  
  <pre><code>&lt;Info&gt;: default_profile_created_at_least_once was already true
  Apr 10 20:23:26 &lt;Name of Server&gt; ProfileManager[1117] &lt;Warning&gt;: ** has_many_polymorphs: Warning; not all usage scenarios for polymorphic scopes are supported yet.
  </code></pre>
  
  <p>In the system log daemon devicemgr always repeated:</p>
  
  <pre><code>&lt;Date, Time and Nome Server&gt;.devicemanager[1634]: DEBUG: Initializing DeviceManagerDaemon with ports 3320,3321,3322,3323,3324,3325,3326,3327,3328,3329 (physmem = 8GB)
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]: DEBUG: Making sure Rails is configured properly
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]: DEBUG: Running rake command: /usr/bin/rake db:migrate
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem rake (&gt;= 0) (Gem::LoadError)
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]:   from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]:   from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]:   from /usr/bin/rake:18
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]: /usr/share/devicemgr/backend/devicemgrd:109:in `rake': Rake command failed with 256 (RuntimeError)
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]:   from /usr/share/devicemgr/backend/devicemgrd:103:in `setupRails'
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]:   from /usr/share/devicemgr/backend/devicemgrd:33:in `run'
  &lt;Date, Time and Nome Server&gt;.devicemanager[1634]:   from /usr/share/devicemgr/backend/devicemgrd:131
  Apr 12 23:02:05 apple com.apple.launchd[1] (com.apple.devicemanager[1634]): Exited with code: 1
  Apr 12 23:02:05 apple com.apple.launchd[1] (com.apple.devicemanager): Throttling respawn: Will start in 10 seconds
  Apr 12 23:02:07 apple xgrid[1637]: gss_init_sec_context is called on main thread, its a blocking api
  Apr 12 23:02:12 apple xgrid[1641]: gss_init_sec_context is called on main thread, its a blocking api
  </code></pre>
  
  <p>How can I fix? If you want to avoid re-install everything. Thanks!</p>